[icinga-checkins] icinga.org: icingaweb2/bugfix/ ini-writer-must-not-persist-section-keys-with-a-null-value-11743: Revert " UserGroupBackendForm: Do not persist null values, really"

git at icinga.org git at icinga.org
Wed Aug 31 16:49:37 CEST 2016


Module: icingaweb2
Branch: bugfix/ini-writer-must-not-persist-section-keys-with-a-null-value-11743
Commit: 20a6e54b6bbe108c3521fec736ec4fad3ccd0738
URL:    https://git.icinga.org/?p=icingaweb2.git;a=commit;h=20a6e54b6bbe108c3521fec736ec4fad3ccd0738

Author: Alexander A. Klimov <alexander.klimov at netways.de>
Date:   Wed Aug 31 16:48:32 2016 +0200

Revert "UserGroupBackendForm: Do not persist null values, really"

This reverts commit 975edbe548ecacabee22fb871e21dd2b8312dc19.

refs #11743

---

 application/forms/Config/UserGroup/UserGroupBackendForm.php |    9 +--------
 1 file changed, 1 insertion(+), 8 deletions(-)

diff --git a/application/forms/Config/UserGroup/UserGroupBackendForm.php b/application/forms/Config/UserGroup/UserGroupBackendForm.php
index 84c1cb4..42e76e3 100644
--- a/application/forms/Config/UserGroup/UserGroupBackendForm.php
+++ b/application/forms/Config/UserGroup/UserGroupBackendForm.php
@@ -127,14 +127,7 @@ class UserGroupBackendForm extends ConfigForm
             unset($data['name']);
         }
 
-        $backendConfig->merge($data);
-        foreach ($backendConfig->toArray() as $k => $v) {
-            if ($v === null) {
-                unset($backendConfig->$k);
-            }
-        }
-
-        $this->config->setSection($name, $backendConfig);
+        $this->config->setSection($name, $backendConfig->merge($data));
         return $this;
     }
 



More information about the icinga-checkins mailing list