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

Allow to save configuration without fields #2679

Merged
merged 1 commit into from
Nov 7, 2022
Merged

Allow to save configuration without fields #2679

merged 1 commit into from
Nov 7, 2022

Conversation

luigifab
Copy link
Contributor

@luigifab luigifab commented Nov 6, 2022

Description

If you have a system / configuration page without any fields, when you press the save button, an error occurred:

Warning: foreach() argument must be of type array|object,
  null given in app/code/core/Mage/Adminhtml/Model/Config/Data.php on line 405

This PR solve this.

OpenMage 20.0.16 / PHP 8.0.25

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)

@github-actions github-actions bot added the Component: Adminhtml Relates to Mage_Adminhtml label Nov 6, 2022
@sreichel
Copy link
Contributor

sreichel commented Nov 6, 2022

Think PR title is misleading.

It "just" correctly hides success message when nothing has been saved.

@fballiano fballiano merged commit 514eccc into OpenMage:1.9.4.x Nov 7, 2022
@github-actions
Copy link
Contributor

github-actions bot commented Nov 7, 2022

Unit Test Results

1 files  1 suites   0s ⏱️
0 tests 0 ✔️ 0 💤 0 ❌
7 runs  5 ✔️ 2 💤 0 ❌

Results for commit 514eccc.

@luigifab luigifab deleted the save-empty branch November 7, 2022 09:58
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