unset should go after usage of by reference value

This commit is contained in:
(d)oekia
2012-11-26 15:08:32 +01:00
parent a11fa5fd14
commit 2735ff47bc
+1 -1
View File
@@ -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;
}