From 97df2a20951039a9318f5e7ae199740c424b82d4 Mon Sep 17 00:00:00 2001 From: vAugagneur Date: Fri, 15 Jun 2012 07:14:58 +0000 Subject: [PATCH] [-] CLASSES : fixed bug #PSCFV-2836 - Warning on Category::recurseLiteCategTree() git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16030 b9a71923-0436-4b27-9f14-aed3839534dd --- classes/Category.php | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/classes/Category.php b/classes/Category.php index d6bfe6d47..be7f0fada 100644 --- a/classes/Category.php +++ b/classes/Category.php @@ -256,12 +256,18 @@ class CategoryCore extends ObjectModel $children[] = $categ->recurseLiteCategTree($max_depth, $current_depth + 1, $id_lang, $excluded_ids_array); } } - + + if (is_array($this->description)) + foreach ($this->description as $lang => $description) + $this->description[$lang] = Category::getDescriptionClean($description); + else + $this->description = Category::getDescriptionClean($this->description); + return array( 'id' => (int)$this->id_category, 'link' => Context::getContext()->link->getCategoryLink($this->id, $this->link_rewrite), 'name' => $this->name, - 'desc'=> Category::getDescriptionClean($this->description), + 'desc'=> $this->description, 'children' => $children ); }