[-] CORE : fixed bug #PSCFV-9460

This commit is contained in:
Vincent Augagneur
2013-06-25 15:25:08 +02:00
parent b7c5201ad8
commit cc4c8bfbe7
+6 -3
View File
@@ -510,9 +510,12 @@ class ProductControllerCore extends FrontController
protected function assignAttributesCombinations() protected function assignAttributesCombinations()
{ {
$attributes_combinations = Product::getAttributesInformationsByProduct($this->product->id); $attributes_combinations = Product::getAttributesInformationsByProduct($this->product->id);
foreach ($attributes_combinations as &$ac) if (is_array($attributes_combinations) && count($attributes_combinations))
foreach ($ac as &$val) foreach ($attributes_combinations as &$ac)
$val = str_replace('-', '_', Tools::link_rewrite(str_replace(array(',', '.'), '-', $val))); 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); $this->context->smarty->assign('attributesCombinations', $attributes_combinations);
} }