From f85fb7ed8beb9e9a411988e1fd928e654a290756 Mon Sep 17 00:00:00 2001 From: vChabot Date: Thu, 9 Aug 2012 12:52:19 +0000 Subject: [PATCH] [-] BO : BugFix : #PSCFV-3554 : Class Category, Method calcLevelDepth: throw Exception --- classes/Category.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/classes/Category.php b/classes/Category.php index 51c0ab67b..bff1b2455 100644 --- a/classes/Category.php +++ b/classes/Category.php @@ -365,7 +365,7 @@ class CategoryCore extends ObjectModel $parent_category = new Category($this->id_parent); 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; }