From a1e8487ca59a6ba531c4249d51fa110eecce996b Mon Sep 17 00:00:00 2001 From: Markus Troeger Date: Mon, 22 Jan 2024 12:21:48 +0100 Subject: [PATCH] [BUGFIX] SelectCategory.php: Cast $value to string (#156) If $value is set bei "getId()" in line 73, it causes an error within "trim()" in line 73, because it's an integer not a string. --- src/FilterService/FilterType/ElasticSearch/SelectCategory.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/FilterService/FilterType/ElasticSearch/SelectCategory.php b/src/FilterService/FilterType/ElasticSearch/SelectCategory.php index 54d53ca14..b7ae82d14 100644 --- a/src/FilterService/FilterType/ElasticSearch/SelectCategory.php +++ b/src/FilterService/FilterType/ElasticSearch/SelectCategory.php @@ -70,7 +70,7 @@ public function addCondition(AbstractFilterDefinitionType $filterDefinition, Pro } elseif (empty($value) && !$isReload && method_exists($filterDefinition, 'getPreSelect')) { $value = $filterDefinition->getPreSelect(); if ($value instanceof ElementInterface) { - $value = $value->getId(); + $value = (string)$value->getId(); } }