Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

getAttributeRawValue return false if value is '0' #572

Merged
merged 5 commits into from
Jan 12, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions app/code/core/Mage/Catalog/Model/Resource/Abstract.php
Original file line number Diff line number Diff line change
Expand Up @@ -575,7 +575,7 @@ protected function _prepareValueForSave($value, Mage_Eav_Model_Entity_Attribute_
* @param int $entityId
* @param int|string|array $attribute atrribute's ids or codes
* @param int|Mage_Core_Model_Store $store
* @return bool|string|array
* @return bool|string|null|array
*/
public function getAttributeRawValue($entityId, $attribute, $store)
{
Expand Down Expand Up @@ -687,8 +687,7 @@ public function getAttributeRawValue($entityId, $attribute, $store)
}

if (count($attributesData) === 1 && !$returnArray) {
$_data = reset($attributesData);
$attributesData = $_data;
return reset($attributesData);
}

return $attributesData ? $attributesData : false;
Expand Down