From 93df9c20148b2168656fb9fdda248017cd4e7344 Mon Sep 17 00:00:00 2001 From: rGaillard Date: Thu, 11 Oct 2012 09:35:45 +0000 Subject: [PATCH] // fix php notice on cart rule addition without conditions --- controllers/admin/AdminCartRulesController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/controllers/admin/AdminCartRulesController.php b/controllers/admin/AdminCartRulesController.php index 4ca55f874..0477eb6de 100644 --- a/controllers/admin/AdminCartRulesController.php +++ b/controllers/admin/AdminCartRulesController.php @@ -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)