From 2735ff47bcb418a871abe062f09d8c3fa8c1b6d4 Mon Sep 17 00:00:00 2001 From: "(d)oekia" Date: Mon, 26 Nov 2012 15:08:32 +0100 Subject: [PATCH] unset should go after usage of by reference value --- controllers/front/CompareController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/controllers/front/CompareController.php b/controllers/front/CompareController.php index 07e52be5b..5a1fb68e6 100644 --- a/controllers/front/CompareController.php +++ b/controllers/front/CompareController.php @@ -105,9 +105,9 @@ class CompareControllerCore extends FrontController $curProduct = new Product((int)$id, true, $this->context->language->id); if (!Validate::isLoadedObject($curProduct) || !$curProduct->active || !$curProduct->isAssociatedToShop()) { - unset($ids[$k]); if (isset($this->context->cookie->id_compare)) CompareProduct::removeCompareProduct($this->context->cookie->id_compare, $id); + unset($ids[$k]); continue; }