From 05139ae6843f6afc5fb3d6549fe04d6d59b09326 Mon Sep 17 00:00:00 2001 From: Matthias Jentsch Date: Fri, 4 Jul 2014 11:38:30 +0200 Subject: [PATCH] Fix a bug in the section map creation of the IniEditor Don't omit the first line when putting 'glued' comments into the following section --- library/Icinga/Config/IniEditor.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/Icinga/Config/IniEditor.php b/library/Icinga/Config/IniEditor.php index 08d918418..8bc2dbed7 100644 --- a/library/Icinga/Config/IniEditor.php +++ b/library/Icinga/Config/IniEditor.php @@ -276,7 +276,7 @@ class IniEditor */ $j = $i - 1; $comments = array(); - while ($j > 0 && $this->isComment($this->text[$j])) { + while ($j >= 0 && $this->isComment($this->text[$j])) { array_push($comments, array_pop($sections[$section])); $j--; }