From d6feb280f845796f88c8b76c8d03fd530e23eb59 Mon Sep 17 00:00:00 2001 From: Albert Mueller Date: Tue, 3 Nov 2020 18:26:42 +0100 Subject: [PATCH] fix return empty string if $string is null --- .../Pimcore/DataObject/AbstractSluggableLinkGenerator.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/CoreShop/Component/Pimcore/DataObject/AbstractSluggableLinkGenerator.php b/src/CoreShop/Component/Pimcore/DataObject/AbstractSluggableLinkGenerator.php index 191270f908..2d0102b2d3 100644 --- a/src/CoreShop/Component/Pimcore/DataObject/AbstractSluggableLinkGenerator.php +++ b/src/CoreShop/Component/Pimcore/DataObject/AbstractSluggableLinkGenerator.php @@ -20,6 +20,10 @@ abstract class AbstractSluggableLinkGenerator implements LinkGeneratorInterface { protected function slugify($string): string { + if ($string === null) { + return ''; + } + return strtolower( trim( preg_replace('~[^0-9a-z]+~i', '-', html_entity_decode(