[-] BO: Fix #PSCFV-3711

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16949 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
rGaillard
2012-08-22 09:36:06 +00:00
parent 9c5fa67d60
commit 7207d46fbe
+3 -2
View File
@@ -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();