diff --git a/src/module-elasticsuite-catalog/Helper/AbstractAttribute.php b/src/module-elasticsuite-catalog/Helper/AbstractAttribute.php index 1070db0da..ca924ec2d 100644 --- a/src/module-elasticsuite-catalog/Helper/AbstractAttribute.php +++ b/src/module-elasticsuite-catalog/Helper/AbstractAttribute.php @@ -246,7 +246,7 @@ public function prepareIndexValue($attributeId, $storeId, $value) $optionTextFieldName = $this->getOptionTextFieldName($attributeCode); $optionTextValues = $this->getIndexOptionsText($attributeId, $storeId, $value); // Filter empty values. Not using array_filter here because it could remove "0" string from values. - $optionTextValues = array_diff(array_map('trim', $optionTextValues), ['', null, false]); + $optionTextValues = array_diff(array_map('trim', array_map('strval', $optionTextValues)), ['', null, false]); $optionTextValues = array_values($optionTextValues); $values[$optionTextFieldName] = $optionTextValues; }