Skip to content

Commit 40dce4c

Browse files
bastienlmfballiano
authored andcommitted
Fixed getAttributeRawValue return false if value is '0' (#572)
1 parent 324d40b commit 40dce4c

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

app/code/core/Mage/Catalog/Model/Resource/Abstract.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -575,7 +575,7 @@ protected function _prepareValueForSave($value, Mage_Eav_Model_Entity_Attribute_
575575
* @param int $entityId
576576
* @param int|string|array $attribute atrribute's ids or codes
577577
* @param int|Mage_Core_Model_Store $store
578-
* @return bool|string|array
578+
* @return bool|string|null|array
579579
*/
580580
public function getAttributeRawValue($entityId, $attribute, $store)
581581
{
@@ -687,8 +687,7 @@ public function getAttributeRawValue($entityId, $attribute, $store)
687687
}
688688

689689
if (count($attributesData) === 1 && !$returnArray) {
690-
$_data = reset($attributesData);
691-
$attributesData = $_data;
690+
return reset($attributesData);
692691
}
693692

694693
return $attributesData ? $attributesData : false;

0 commit comments

Comments
 (0)