[-] 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:
1 parent
9c5fa67d60
commit
7207d46fbe
1 file changed
+2
-1
@@ -557,11 +557,12 @@ class AdminShopControllerCore extends AdminController
|
|||||||
*/
|
*/
|
||||||
public function processAdd()
|
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.');
|
$this->errors[] = $this->l('You need to select at least the root category.');
|
||||||
|
|
||||||
if (Tools::isSubmit('id_category_default'))
|
if (Tools::isSubmit('id_category_default'))
|
||||||
$_POST['id_category'] = (int)Tools::getValue('id_category_default');
|
$_POST['id_category'] = (int)Tools::getValue('id_category_default');
|
||||||
|
|
||||||
/* Checking fields validity */
|
/* Checking fields validity */
|
||||||
$this->validateRules();
|
$this->validateRules();
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user