Skip to content

Commit bbe69a4

Browse files
authored
Fixed getAttributeRawValue return false if value is '0' (#572)
1 parent e50f97a commit bbe69a4

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

+2-3
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)