From 5e8a84c78240ef10485da90ab265addb9dd52fe3 Mon Sep 17 00:00:00 2001 From: ah-net <103565001+ah-net@users.noreply.github.com> Date: Thu, 27 Jun 2024 14:58:30 +0200 Subject: [PATCH] fix: empty slug --- Model/Catalog/Layer/Url/Strategy/FilterSlugManager.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Model/Catalog/Layer/Url/Strategy/FilterSlugManager.php b/Model/Catalog/Layer/Url/Strategy/FilterSlugManager.php index b17b5b8b..7dbe6bbf 100644 --- a/Model/Catalog/Layer/Url/Strategy/FilterSlugManager.php +++ b/Model/Catalog/Layer/Url/Strategy/FilterSlugManager.php @@ -89,6 +89,11 @@ public function getSlugForFilterItem(Item $filterItem): string $slug = $this->translitUrl->filter($attribute); + if (empty($slug)) { + //should never happen, but just in case we return the attribute + return $attribute; + } + /** @var AttributeSlug $attributeSlugEntity */ $attributeSlugEntity = $this->attributeSlugFactory->create(); $attributeSlugEntity->setAttribute($attribute);