Browse Source

improved errorhandler output

when error occurs while handling errors output was not readable in web
context
tags/2.0.0-beta
Carsten Brandt 11 years ago
parent
commit
3a981e26da
  1. 6
      framework/yii/base/Application.php

6
framework/yii/base/Application.php

@ -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);

Loading…
Cancel
Save