// fix php notice on cart rule addition without conditions

This commit is contained in:
rGaillard
2012-10-11 09:35:45 +00:00
parent 8771aaea08
commit 93df9c2014
@@ -60,7 +60,7 @@ class AdminCartRulesControllerCore extends AdminController
// First, check if it is not already part of the restrictions
$already_restricted = false;
if (Tools::getValue('product_restriction') && is_array($rule_group_array = Tools::getValue('product_rule_group')) && count($rule_group_array))
if (is_array($rule_group_array = Tools::getValue('product_rule_group')) && count($rule_group_array) && Tools::getValue('product_restriction'))
foreach ($rule_group_array as $rule_group_id)
if (is_array($rule_array = Tools::getValue('product_rule_'.$rule_group_id)) && count($rule_array))
foreach ($rule_array as $rule_id)