mirror of
https://github.com/yiisoft/yii2.git
synced 2025-11-13 04:38:03 +08:00
simplified errorhandler registration.
This commit is contained in:
@@ -149,17 +149,7 @@ class Application extends \yii\base\Application
|
||||
'response' => ['class' => 'yii\web\Response'],
|
||||
'session' => ['class' => 'yii\web\Session'],
|
||||
'user' => ['class' => 'yii\web\User'],
|
||||
'errorHandler' => ['class' => 'yii\web\ErrorHandler'],
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Registers the errorHandler component as a PHP error handler.
|
||||
*/
|
||||
protected function registerErrorHandler(&$config)
|
||||
{
|
||||
if (!isset($config['components']['errorHandler']['class'])) {
|
||||
$config['components']['errorHandler']['class'] = 'yii\\web\\ErrorHandler';
|
||||
}
|
||||
parent::registerErrorHandler($config);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user