-
-
Notifications
You must be signed in to change notification settings - Fork 436
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
Fixed store get attribute raw value #1034
Fixed store get attribute raw value #1034
Conversation
Can you describe steps how can I test it? (even if it requires an xdebug session) |
I tested with $result = Mage::getResourceSingleton('catalog/product')->getAttributeRawValue(
1,
[74,99,98],
0
); The result is the same for the existing code and the modified code:
|
Thanks @kiatng. I would also like to tests the case which was broken before and now is fixed. |
I managed to replicate the bug. As per description:
Test code: $result =$result = Mage::getResourceSingleton('catalog/product')->getAttributeRawValue(
1,
[74,99,98,'custom_layout_update'],
2
); Test result with code in the PR:
Test result with core code:
The PR is correct. A screenshot from PMA can shed more light: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can replicate the bug and this PR indeed fixes it.
@kiatng yes thats the usage which is buggy, with different store than default 0, I am talking about |
…called for multiple attributes and non-admin store If some attributes don't have a value for the requested store view values from other attributes are returned.
…called for multiple attributes and non-admin store If some attributes don't have a value for the requested store view values from other attributes are returned.
My collegue found another bug in method getAttributeRawValue. It retured values for other attributes when passed array of attributes to second parameter
$attribute
and store value does not exist for some of the attributes.