Skip to content

Commit

Permalink
surpress array to string conversion (OpenMage#605)
Browse files Browse the repository at this point in the history
* surpress array to string conversion

surpress array to string conversion

not sure about all the use cases here but (string) would only affect FALSE to be empty string ""

all other variables woould be something else than an empty string

feedback welcome

* Updated check
  • Loading branch information
seansan authored and colinmollenhour committed Apr 4, 2019
1 parent dbe8b3b commit 5056d17
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ public function getAdditionalData(array $excludeAttr = array())

if (!$product->hasData($attribute->getAttributeCode())) {
$value = Mage::helper('catalog')->__('N/A');
} elseif ((string)$value == '') {
} elseif (is_null($value) || $value === false || $value === '') {
$value = Mage::helper('catalog')->__('No');
} elseif ($attribute->getFrontendInput() == 'price' && is_string($value)) {
$value = Mage::app()->getStore()->convertPrice($value, true);
Expand Down

0 comments on commit 5056d17

Please sign in to comment.