$id_shop_list filtering in addAttribute

When addAttribute is used with a not-empty $id_shop_list array argument,
the shop IDs are not filtered to be unique, so $combination->add()
fails.
This commit is contained in:
Samy Rabih
2013-05-13 14:50:24 +02:00
parent 52bffe6917
commit 7b26967df0
+1
View File
@@ -1448,6 +1448,7 @@ class ProductCore extends ObjectModel
$id_shop_list_array = Product::getShopsByProduct($this->id);
foreach ($id_shop_list_array as $array_shop)
$id_shop_list[] = $array_shop['id_shop'];
$id_shop_list = array_unique($id_shop_list);
}
if (count($id_shop_list))