mirror of
https://github.com/yiisoft/yii2.git
synced 2025-11-02 21:41:19 +08:00
simplified errorhandler registration.
This commit is contained in:
@ -187,17 +187,7 @@ class Application extends \yii\base\Application
|
||||
return array_merge(parent::coreComponents(), [
|
||||
'request' => ['class' => 'yii\console\Request'],
|
||||
'response' => ['class' => 'yii\console\Response'],
|
||||
'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\\console\\ErrorHandler';
|
||||
}
|
||||
parent::registerErrorHandler($config);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user