From cc4c8bfbe7763c917a3ee1e7e030560905fc24b7 Mon Sep 17 00:00:00 2001 From: Vincent Augagneur Date: Tue, 25 Jun 2013 15:25:08 +0200 Subject: [PATCH] [-] CORE : fixed bug #PSCFV-9460 --- controllers/front/ProductController.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/controllers/front/ProductController.php b/controllers/front/ProductController.php index 0938d1106..853b178b6 100644 --- a/controllers/front/ProductController.php +++ b/controllers/front/ProductController.php @@ -510,9 +510,12 @@ class ProductControllerCore extends FrontController protected function assignAttributesCombinations() { $attributes_combinations = Product::getAttributesInformationsByProduct($this->product->id); - foreach ($attributes_combinations as &$ac) - foreach ($ac as &$val) - $val = str_replace('-', '_', Tools::link_rewrite(str_replace(array(',', '.'), '-', $val))); + if (is_array($attributes_combinations) && count($attributes_combinations)) + foreach ($attributes_combinations as &$ac) + foreach ($ac as &$val) + $val = str_replace('-', '_', Tools::link_rewrite(str_replace(array(',', '.'), '-', $val))); + else + $attributes_combinations = array(); $this->context->smarty->assign('attributesCombinations', $attributes_combinations); }