Skip to content

Commit

Permalink
refs #4780 preserve line breaks
Browse files Browse the repository at this point in the history
  • Loading branch information
tsteur committed Mar 24, 2014
1 parent dbe8a79 commit 09031de
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions core/Common.php
Expand Up @@ -1068,12 +1068,16 @@ static public function printDebug($info = '')

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));
}
}
}
}
Expand Down

0 comments on commit 09031de

Please sign in to comment.