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);