diff --git a/Model/Service/Product/Category/DefaultCategoryService.php b/Model/Service/Product/Category/DefaultCategoryService.php index a714e416c..e36cfa8d7 100644 --- a/Model/Service/Product/Category/DefaultCategoryService.php +++ b/Model/Service/Product/Category/DefaultCategoryService.php @@ -130,7 +130,8 @@ public function getCategory(Category $category, StoreInterface $store) ['categoryString' => $nostoCategory, 'magentoCategory' => $category] ); } - return trim($nostoCategory); + + return $nostoCategory ? trim($nostoCategory) : $nostoCategory; } /**