From 06e0c50699d434d137b9adee89261a247f67c530 Mon Sep 17 00:00:00 2001 From: Alexandr <258428@mail.ru> Date: Sun, 18 May 2014 02:55:40 +0700 Subject: [PATCH 1/2] Update ErrorAction.php --- framework/web/ErrorAction.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/framework/web/ErrorAction.php b/framework/web/ErrorAction.php index ccba108fb5..a4cc7de43d 100644 --- a/framework/web/ErrorAction.php +++ b/framework/web/ErrorAction.php @@ -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 ''; } From a07b4afea6af1e3fd5dbd71cb17d27eae7d136c5 Mon Sep 17 00:00:00 2001 From: Alexandr <258428@mail.ru> Date: Sun, 18 May 2014 02:56:38 +0700 Subject: [PATCH 2/2] Update Controller.php --- framework/web/Controller.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/framework/web/Controller.php b/framework/web/Controller.php index 3f25f798cc..c249c9af71 100644 --- a/framework/web/Controller.php +++ b/framework/web/Controller.php @@ -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;