mirror of
https://github.com/yiisoft/yii2.git
synced 2025-11-17 23:09:10 +08:00
improved errorhandler output
when error occurs while handling errors output was not readable in web context
This commit is contained in:
@@ -450,7 +450,11 @@ abstract class Application extends Module
|
||||
$msg .= "\nPrevious exception:\n";
|
||||
$msg .= (string)$exception;
|
||||
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);
|
||||
error_log($msg);
|
||||
|
||||
Reference in New Issue
Block a user