From fb604492b77851fcbe5b260877b48ec36e490cca Mon Sep 17 00:00:00 2001 From: Damien Metzger Date: Thu, 2 May 2013 16:06:09 +0200 Subject: [PATCH] [-] BO : fixed infinite loop in the categories #PSCFV-8965 --- controllers/admin/AdminCategoriesController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/controllers/admin/AdminCategoriesController.php b/controllers/admin/AdminCategoriesController.php index e7a4ea71c..0a512abd5 100644 --- a/controllers/admin/AdminCategoriesController.php +++ b/controllers/admin/AdminCategoriesController.php @@ -146,7 +146,7 @@ class AdminCategoriesControllerCore extends AdminController if (Shop::isFeatureActive() && Shop::getContext() != Shop::CONTEXT_SHOP) unset($this->fields_list['position']); // shop restriction : if category is not available for current shop, we redirect to the list from default category - if (!$this->_category->isAssociatedToShop() && Shop::getContext() == Shop::CONTEXT_SHOP) + if (Validate::isLoadedObject($this->_category) && !$this->_category->isAssociatedToShop() && Shop::getContext() == Shop::CONTEXT_SHOP) { $this->redirect_after = self::$currentIndex.'&id_category='.(int)$this->context->shop->getCategory().'&token='.$this->token; $this->redirect();