From 01371b1dcf9a41873d8a5aae4342ea3d0ced3f63 Mon Sep 17 00:00:00 2001 From: rGaillard Date: Wed, 3 Oct 2012 10:11:03 +0000 Subject: [PATCH] // small fix git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@17714 b9a71923-0436-4b27-9f14-aed3839534dd --- controllers/admin/AdminProductsController.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/controllers/admin/AdminProductsController.php b/controllers/admin/AdminProductsController.php index da9f5116e..0b0cbea37 100644 --- a/controllers/admin/AdminProductsController.php +++ b/controllers/admin/AdminProductsController.php @@ -3417,9 +3417,10 @@ class AdminProductsControllerCore extends AdminController if (Shop::isFeatureActive()) $shops = Shop::getShops(); - foreach ($shops as $key => $shop) - if (!$obj->isAssociatedToShop($shop['id_shop'])) - unset($shops[$key]); + if ($shops) + foreach ($shops as $key => $shop) + if (!$obj->isAssociatedToShop($shop['id_shop'])) + unset($shops[$key]); $data->assign('shops', $shops);