From 7207d46fbeb299463d82905ebeef3b5221980832 Mon Sep 17 00:00:00 2001 From: rGaillard Date: Wed, 22 Aug 2012 09:36:06 +0000 Subject: [PATCH] [-] BO: Fix #PSCFV-3711 git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16949 b9a71923-0436-4b27-9f14-aed3839534dd --- controllers/admin/AdminShopController.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/controllers/admin/AdminShopController.php b/controllers/admin/AdminShopController.php index a334b4fbf..20bd3ac03 100755 --- a/controllers/admin/AdminShopController.php +++ b/controllers/admin/AdminShopController.php @@ -557,11 +557,12 @@ class AdminShopControllerCore extends AdminController */ public function processAdd() { - if (!Tools::getValue('categoryBox')) + if (!Tools::getValue('categoryBox') || !in_array(Tools::getValue('id_category'), Tools::getValue('categoryBox'))) $this->errors[] = $this->l('You need to select at least the root category.'); - + if (Tools::isSubmit('id_category_default')) $_POST['id_category'] = (int)Tools::getValue('id_category_default'); + /* Checking fields validity */ $this->validateRules();