Skip to content

Commit

Permalink
Merge pull request Smile-SA#3338 from Smile-SA/fix-typeErrorPhp8
Browse files Browse the repository at this point in the history
Prevent type error on php8 if attribut label is a phrase object
  • Loading branch information
romainruaud authored Aug 1, 2024
2 parents 3a5d073 + 05f24db commit f7ade06
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ function ($frontendLabel) use ($storeId) {

$optionLabel = $value->getValue();
if ($attribute && $attribute->getFrontendInput() == 'boolean') {
$optionLabel = $attribute->getSource()->getOptionText($value->getValue());
$optionLabel = (string) $attribute->getSource()->getOptionText($value->getValue());
}

$options[] = $this->layerFormatter->buildItem($optionLabel, $value->getValue(), $metrics['count']);
Expand Down

0 comments on commit f7ade06

Please sign in to comment.