From 198340eb2c5fce3fd45c7c709135e938bf54e127 Mon Sep 17 00:00:00 2001 From: rleroy Date: Thu, 13 Oct 2016 15:23:22 +0200 Subject: [PATCH] Fix error when no flat resources Magento\Catalog\Model\Category::getChildren() returns a string of comma-separated category ids. In order to get the category objects, the method to use is ::getChildrenCategories(). --- Block/Sidebar.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Block/Sidebar.php b/Block/Sidebar.php index a30668b..f4d0fdf 100644 --- a/Block/Sidebar.php +++ b/Block/Sidebar.php @@ -194,7 +194,7 @@ public function getSubcategories($category) return (array)$category->getChildrenNodes(); } - return $category->getChildren(); + return $category->getChildrenCategories(); } /**