diff --git a/framework/yii/base/View.php b/framework/yii/base/View.php index 77d0e5c..df0b2b2 100644 --- a/framework/yii/base/View.php +++ b/framework/yii/base/View.php @@ -12,7 +12,6 @@ use yii\helpers\FileHelper; use yii\helpers\Html; use yii\web\JqueryAsset; use yii\web\AssetBundle; -use yii\web\Request; use yii\widgets\Block; use yii\widgets\ContentDecorator; use yii\widgets\FragmentCache; @@ -711,7 +710,7 @@ class View extends Component } $request = Yii::$app->getRequest(); - if ($request instanceof Request && $request->enableCsrfValidation) { + if ($request instanceof \yii\web\Request && $request->enableCsrfValidation) { $lines[] = Html::tag('meta', '', array('name' => 'csrf-var', 'content' => $request->csrfVar)); $lines[] = Html::tag('meta', '', array('name' => 'csrf-token', 'content' => $request->getCsrfToken())); }