Commit 3a981e26 by Carsten Brandt

improved errorhandler output

when error occurs while handling errors output was not readable in web context
parent ee89134f
...@@ -450,7 +450,11 @@ abstract class Application extends Module ...@@ -450,7 +450,11 @@ abstract class Application extends Module
$msg .= "\nPrevious exception:\n"; $msg .= "\nPrevious exception:\n";
$msg .= (string)$exception; $msg .= (string)$exception;
if (YII_DEBUG) { if (YII_DEBUG) {
echo $msg; if (PHP_SAPI === 'cli') {
echo $msg . "\n";
} else {
echo '<pre>' . htmlspecialchars($msg, ENT_QUOTES, $this->charset) . '</pre>';
}
} }
$msg .= "\n\$_SERVER = " . var_export($_SERVER, true); $msg .= "\n\$_SERVER = " . var_export($_SERVER, true);
error_log($msg); error_log($msg);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment