mirror of
https://github.com/yiisoft/yii2.git
synced 2025-11-15 05:45:33 +08:00
Merge pull request #3499 from ShNURoK42/master
Rename errorHandler to getErrorHandler()
This commit is contained in:
@@ -105,7 +105,7 @@ class Controller extends \yii\base\Controller
|
||||
public function beforeAction($action)
|
||||
{
|
||||
if (parent::beforeAction($action)) {
|
||||
if ($this->enableCsrfValidation && Yii::$app->errorHandler->exception === null && !Yii::$app->getRequest()->validateCsrfToken()) {
|
||||
if ($this->enableCsrfValidation && Yii::$app->getErrorHandler()->exception === null && !Yii::$app->getRequest()->validateCsrfToken()) {
|
||||
throw new BadRequestHttpException(Yii::t('yii', 'Unable to verify your data submission.'));
|
||||
}
|
||||
return true;
|
||||
|
||||
@@ -68,7 +68,7 @@ class ErrorAction extends Action
|
||||
|
||||
public function run()
|
||||
{
|
||||
if (($exception = Yii::$app->errorHandler->exception) === null) {
|
||||
if (($exception = Yii::$app->getErrorHandler()->exception) === null) {
|
||||
return '';
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user