From e8bbd295b24f7b4a61569e9faf63837748cdf8a2 Mon Sep 17 00:00:00 2001 From: Markus Troeger Date: Fri, 19 Jan 2024 14:44:11 +0100 Subject: [PATCH] SelectCategory.php: Cast $value to string $value can set with an int value (line 73) by "getId()". Trim throws in strict mode an error, if it doesn't get a string. Therefore we need to cast $value to 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..87ad87330 100644 --- a/src/FilterService/FilterType/ElasticSearch/SelectCategory.php +++ b/src/FilterService/FilterType/ElasticSearch/SelectCategory.php @@ -77,7 +77,7 @@ public function addCondition(AbstractFilterDefinitionType $filterDefinition, Pro $currentFilter[$filterDefinition->getField()] = $value; if (!empty($value)) { - $value = trim($value); + $value = trim((string)$value); $productList->addCondition($value, $filterDefinition->getField()); }