simplified errorhandler registration.

This commit is contained in:
Qiang Xue
2014-05-11 20:59:20 -04:00
parent 32aa175b7c
commit a2aa20f183
3 changed files with 4 additions and 31 deletions

View File

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