From 09031def185c572b0b9e88ba93d841a0a8d11e0c Mon Sep 17 00:00:00 2001 From: Thomas Steur <thomas.steur@googlemail.com> Date: Mon, 24 Mar 2014 23:24:49 +0100 Subject: [PATCH] refs #4780 preserve line breaks --- core/Common.php | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/core/Common.php b/core/Common.php index ec31f88280..57349802e9 100644 --- a/core/Common.php +++ b/core/Common.php @@ -1068,12 +1068,16 @@ class Common Log::getInstance()->setLogLevel(Log::DEBUG); - if (is_array($info)) { + if (is_array($info) || is_object($info)) { $info = Common::sanitizeInputValues($info); $out = var_export($info, true); - Log::debug($out); + foreach (explode("\n", $out) as $line) { + Log::debug($line); + } } else { - Log::debug(htmlspecialchars($info, ENT_QUOTES)); + foreach (explode("\n", $info) as $line) { + Log::debug(htmlspecialchars($line, ENT_QUOTES)); + } } } } -- GitLab