From 4767e011f0b4c3b90cbe335aa691eaa839f9e7c1 Mon Sep 17 00:00:00 2001 From: Timo Klement Date: Mon, 20 Feb 2017 17:19:18 +0100 Subject: [PATCH] Fix check for boolean product attributes --- app/code/Magento/Catalog/Block/Product/View/Attributes.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/code/Magento/Catalog/Block/Product/View/Attributes.php b/app/code/Magento/Catalog/Block/Product/View/Attributes.php index 4fb047d7a922b..8277d2b2dfa29 100644 --- a/app/code/Magento/Catalog/Block/Product/View/Attributes.php +++ b/app/code/Magento/Catalog/Block/Product/View/Attributes.php @@ -12,6 +12,7 @@ namespace Magento\Catalog\Block\Product\View; use Magento\Catalog\Model\Product; +use Magento\Framework\Phrase; use Magento\Framework\Pricing\PriceCurrencyInterface; class Attributes extends \Magento\Framework\View\Element\Template @@ -85,8 +86,8 @@ public function getAdditionalData(array $excludeAttr = []) } elseif ($attribute->getFrontendInput() == 'price' && is_string($value)) { $value = $this->priceCurrency->convertAndFormat($value); } - - if (is_string($value) && strlen($value)) { + + if ($value instanceof Phrase || (is_string($value) && strlen($value))) { $data[$attribute->getAttributeCode()] = [ 'label' => __($attribute->getStoreLabel()), 'value' => $value,