Skip to content

Commit

Permalink
Fix that updating INI repositories is impossible
Browse files Browse the repository at this point in the history
(cherry picked from commit d5de7e9)
Signed-off-by: Eric Lippmann <eric.lippmann@icinga.com>
  • Loading branch information
lippserd committed Sep 28, 2017
1 parent 13e86b6 commit 7cec28a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion library/Icinga/Repository/IniRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,9 @@ public function update($target, array $data, Filter $filter = null)
$newConfig = clone $config;
foreach ($newData as $column => $value) {
if ($column === $keyColumn) {
$newSection = $value;
if ($value !== $config->get($keyColumn)) {
$newSection = $value;
}
} else {
$newConfig->$column = $value;
}
Expand Down

0 comments on commit 7cec28a

Please sign in to comment.