From e779ef330985bbe8ae28647f8de0850b2ae78b03 Mon Sep 17 00:00:00 2001 From: Cid Lopes Date: Wed, 30 Aug 2023 12:13:56 +0300 Subject: [PATCH] Some default categories have no path --- Model/Category/Builder.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Model/Category/Builder.php b/Model/Category/Builder.php index 13b34730d..f8abe18a9 100644 --- a/Model/Category/Builder.php +++ b/Model/Category/Builder.php @@ -92,8 +92,8 @@ public function build(Category $category, Store $store) $nostoCategory->setParentId($category->getParentId()); $nostoCategory->setTitle($this->getCategoryNameById($category->getId(), $store->getId())); $path = $this->nostoCategoryService->getCategory($category, $store); - $nostoCategory->setPath($path); - $nostoCategory->setCategoryString($path); + $nostoCategory->setPath($path ?? ''); + $nostoCategory->setCategoryString($path ?? ''); $nostoCategory->setUrl($category->getUrl()); $nostoCategory->setAvailable($category->getIsActive() ?? false); } catch (Exception $e) {