From e3f9d1b6bd590ae3becd87c1fbb03c5efa0f98a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jannis=20Mo=C3=9Fhammer?= Date: Tue, 27 Aug 2013 18:49:30 +0200 Subject: [PATCH] Replace "\n" with PHP_EOL refs #4615 --- library/Icinga/Config/IniEditor.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/library/Icinga/Config/IniEditor.php b/library/Icinga/Config/IniEditor.php index b9d7a986e..4e167c7d3 100644 --- a/library/Icinga/Config/IniEditor.php +++ b/library/Icinga/Config/IniEditor.php @@ -81,7 +81,7 @@ class IniEditor $content, array $options = array() ) { - $this->text = explode("\n", $content); + $this->text = explode(PHP_EOL, $content); $this->valueIndentation = array_key_exists('valueIndentation', $options) ? $options['valueIndentation'] : 19; $this->commentIndentation = array_key_exists('commentIndentation', $options) @@ -337,7 +337,7 @@ class IniEditor public function getText() { $this->cleanUpWhitespaces(); - return implode("\n", $this->text); + return implode(PHP_EOL, $this->text); } /** @@ -370,7 +370,7 @@ class IniEditor * Refresh section separators */ if ($i !== 0 && $this->sectionSeparators > 0) { - $this->insertAtLine($i + 1, str_repeat("\n", $this->sectionSeparators - 1)); + $this->insertAtLine($i + 1, str_repeat(PHP_EOL, $this->sectionSeparators - 1)); } } }