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

getAttributeCode() on null prevention by moving after AttributeAbstract check #3344

Merged
merged 1 commit into from
Jun 22, 2023

Conversation

discountscott
Copy link
Contributor

Description (*)

Move productAttributeCode until after the check to ensure productAttribute is not null.

Encountered during a product export

Fatal error: Uncaught Error: Call to a member function getAttributeCode() on null in /app/code/core/Mage/Catalog/Model/Resource/Product/Type/Configurable/Attribute/Collection.php:240 

Related Pull Requests

Appears to have been introduced in #2605

Fixed Issues (if relevant)

Manual testing scenarios (*)

Questions or comments

Contribution checklist (*)

  • Pull request has a meaningful description of its purpose
  • All commits are accompanied by meaningful commit messages
  • All automated tests passed successfully (all builds are green)
  • Add yourself to contributors list

@github-actions github-actions bot added the Component: Catalog Relates to Mage_Catalog label Jun 21, 2023
Copy link
Collaborator

@kiatng kiatng left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch!.

@fballiano fballiano merged commit c22f7cc into OpenMage:main Jun 22, 2023
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: Catalog Relates to Mage_Catalog
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants