mirror of
https://github.com/yiisoft/yii2.git
synced 2025-08-26 06:15:19 +08:00
Fixed incorrect error handling.
This commit is contained in:
@ -93,10 +93,10 @@ class ErrorHandler extends Component
|
||||
return;
|
||||
}
|
||||
|
||||
$useErrorView = $response->format === \yii\web\Response::FORMAT_HTML && (!YII_DEBUG || $exception instanceof UserException);
|
||||
|
||||
$response = Yii::$app->getResponse();
|
||||
|
||||
$useErrorView = $response->format === \yii\web\Response::FORMAT_HTML && (!YII_DEBUG || $exception instanceof UserException);
|
||||
|
||||
if ($useErrorView && $this->errorAction !== null) {
|
||||
$result = Yii::$app->runAction($this->errorAction);
|
||||
if ($result instanceof Response) {
|
||||
|
Reference in New Issue
Block a user