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

Avoided calling getBackendModelByFieldConfig with empty field #3151

Merged
merged 1 commit into from
Apr 7, 2023
Merged

Avoided calling getBackendModelByFieldConfig with empty field #3151

merged 1 commit into from
Apr 7, 2023

Conversation

fballiano
Copy link
Contributor

If you open the backend and go to System -> configuration -> advanced -> advanced and just hit save, you'll see this error:

Uncaught TypeError: Argument 1 passed to Mage_Adminhtml_Helper_Config::getBackendModelByFieldConfig() must be an instance of Varien_Simplexml_Element, bool given, called in app/code/core/Mage/Adminhtml/Model/Config/Data.php on line 141

This was introduced in #2945

With this PR we make sure not to call $helper->getBackendModelByFieldConfig($fieldConfig) if we don't have any fieldConfig.

After applying the PR, hit save and it works as expected.

@github-actions github-actions bot added the Component: Adminhtml Relates to Mage_Adminhtml label Apr 7, 2023
@elidrissidev
Copy link
Member

This needs to be backported to 1.9.4.x.

@fballiano fballiano merged commit 472a22a into OpenMage:main Apr 7, 2023
@fballiano fballiano deleted the fixsavingconfig branch April 7, 2023 21:29
@fballiano
Copy link
Contributor Author

merge and cherrypicked to v19 branch (1.9.4.x is set for deletion after PRs are rebased)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: Adminhtml Relates to Mage_Adminhtml
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants