Skip to content

Commit da396e5

Browse files
authored
MAGETWO-65364: [GitHub][PR] Fix check for boolean product attributes #8623
2 parents 1b3dd5a + c7623a3 commit da396e5

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

app/code/Magento/Catalog/Block/Product/View/Attributes.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
namespace Magento\Catalog\Block\Product\View;
1313

1414
use Magento\Catalog\Model\Product;
15+
use Magento\Framework\Phrase;
1516
use Magento\Framework\Pricing\PriceCurrencyInterface;
1617

1718
class Attributes extends \Magento\Framework\View\Element\Template
@@ -85,8 +86,8 @@ public function getAdditionalData(array $excludeAttr = [])
8586
} elseif ($attribute->getFrontendInput() == 'price' && is_string($value)) {
8687
$value = $this->priceCurrency->convertAndFormat($value);
8788
}
88-
89-
if (is_string($value) && strlen($value)) {
89+
90+
if ($value instanceof Phrase || (is_string($value) && strlen($value))) {
9091
$data[$attribute->getAttributeCode()] = [
9192
'label' => __($attribute->getStoreLabel()),
9293
'value' => $value,

0 commit comments

Comments
 (0)