From 7b26967df0ad12c181c3f4e9d20ea2576e7b9fbb Mon Sep 17 00:00:00 2001 From: Samy Rabih Date: Mon, 13 May 2013 14:50:24 +0200 Subject: [PATCH] $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. --- classes/Product.php | 1 + 1 file changed, 1 insertion(+) diff --git a/classes/Product.php b/classes/Product.php index d253d87f7..f86a1c09f 100644 --- a/classes/Product.php +++ b/classes/Product.php @@ -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))