Skip to content

Commit 96c14d4

Browse files
luigifabfballiano
authored andcommitted
Allow to save configuration without any fields (#2679)
1 parent 2d403c8 commit 96c14d4

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

app/code/core/Mage/Adminhtml/controllers/System/ConfigController.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ public function saveAction()
132132
$session = Mage::getSingleton('adminhtml/session');
133133
/** @var Mage_Adminhtml_Model_Session $session */
134134

135-
$groups = $this->getRequest()->getPost('groups');
135+
$groups = $this->getRequest()->getPost('groups', []);
136136

137137
if (isset($_FILES['groups']['name']) && is_array($_FILES['groups']['name'])) {
138138
/**
@@ -180,7 +180,10 @@ public function saveAction()
180180
Mage::dispatchEvent("admin_system_config_changed_section_{$section}",
181181
['website' => $website, 'store' => $store]
182182
);
183-
$session->addSuccess(Mage::helper('adminhtml')->__('The configuration has been saved.'));
183+
184+
if (!empty($groups)) {
185+
$session->addSuccess(Mage::helper('adminhtml')->__('The configuration has been saved.'));
186+
}
184187
}
185188
catch (Mage_Core_Exception $e) {
186189
foreach(explode("\n", $e->getMessage()) as $message) {

0 commit comments

Comments
 (0)