[-] BO : BugFix : #PSCFV-3554 : Class Category, Method calcLevelDepth: throw Exception
This commit is contained in:
@@ -365,7 +365,7 @@ class CategoryCore extends ObjectModel
|
|||||||
|
|
||||||
$parent_category = new Category($this->id_parent);
|
$parent_category = new Category($this->id_parent);
|
||||||
if (!Validate::isLoadedObject($parent_category))
|
if (!Validate::isLoadedObject($parent_category))
|
||||||
die('parent category does not exist');
|
throw new PrestaShopException('Parent category does not exist');
|
||||||
return $parent_category->level_depth + 1;
|
return $parent_category->level_depth + 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user