From adf158a0c3ad2f187f29b6ce14387838c69dbd51 Mon Sep 17 00:00:00 2001 From: rGaillard Date: Fri, 6 Dec 2013 17:31:09 +0100 Subject: [PATCH] // small fix --- classes/Category.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/classes/Category.php b/classes/Category.php index 6187934c9..ae8c54802 100644 --- a/classes/Category.php +++ b/classes/Category.php @@ -154,8 +154,8 @@ class CategoryCore extends ObjectModel if (!isset($this->level_depth)) $this->level_depth = $this->calcLevelDepth(); - if ($this->is_root_category) - $this->id_parent = (int)Configuration::get('PS_ROOT_CATEGORY'); + if ($this->is_root_category && ($id_root_category = (int)Configuration::get('PS_ROOT_CATEGORY'))) + $this->id_parent = $id_root_category; $ret = parent::add($autodate, $null_values); if (Tools::isSubmit('checkBoxShopAsso_category'))