From 85a8191f6e4ed9b7acfff522d785d49ff74743cc Mon Sep 17 00:00:00 2001 From: Dilip Date: Sun, 9 Feb 2014 08:50:51 +0530 Subject: [PATCH] Changed csrf-var to csrf-param Changed csrf-var to csrf-param due to meta validation error. The validation error as mentioned in the issue https://github.com/yiisoft/yii2/issues/2363. It is fixed in this pull request. --- framework/web/View.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/framework/web/View.php b/framework/web/View.php index eb83bc7985..85e0589d8b 100644 --- a/framework/web/View.php +++ b/framework/web/View.php @@ -454,7 +454,7 @@ class View extends \yii\base\View $request = Yii::$app->getRequest(); if ($request instanceof \yii\web\Request && $request->enableCsrfValidation && !$request->getIsAjax()) { - $lines[] = Html::tag('meta', '', ['name' => 'csrf-var', 'content' => $request->csrfVar]); + $lines[] = Html::tag('meta', '', ['name' => 'csrf-param', 'content' => $request->csrfVar]); $lines[] = Html::tag('meta', '', ['name' => 'csrf-token', 'content' => $request->getCsrfToken()]); }