From 9bb798c18b33bd31259722d95a2e98b11ec6006d Mon Sep 17 00:00:00 2001 From: "Alexander A. Klimov" Date: Wed, 12 Oct 2016 11:06:04 +0200 Subject: [PATCH] IniWriter: don't persist a section key if the value is null refs #11743 --- library/Icinga/File/Ini/IniWriter.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/library/Icinga/File/Ini/IniWriter.php b/library/Icinga/File/Ini/IniWriter.php index 83410599f..f00040e39 100644 --- a/library/Icinga/File/Ini/IniWriter.php +++ b/library/Icinga/File/Ini/IniWriter.php @@ -149,6 +149,10 @@ class IniWriter $domSection = $doc->getSection($section); } foreach ($directives as $key => $value) { + if ($value === null) { + continue; + } + if ($value instanceof ConfigObject) { throw new ProgrammingError('Cannot diff recursive configs'); }