diff --git a/framework/yii/base/Application.php b/framework/yii/base/Application.php index 3cc90d9..683b9ce 100644 --- a/framework/yii/base/Application.php +++ b/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 '
' . htmlspecialchars($msg, ENT_QUOTES, $this->charset) . '
'; + } } $msg .= "\n\$_SERVER = " . var_export($_SERVER, true); error_log($msg);