diff --git a/extensions/bootstrap/Nav.php b/extensions/bootstrap/Nav.php index 42e6346..6334cb9 100644 --- a/extensions/bootstrap/Nav.php +++ b/extensions/bootstrap/Nav.php @@ -100,7 +100,7 @@ class Nav extends Widget $this->route = Yii::$app->controller->getRoute(); } if ($this->params === null) { - $this->params = $_GET; + $this->params = Yii::$app->request->getQueryParams(); } Html::addCssClass($this->options, 'nav'); } diff --git a/extensions/gii/generators/crud/templates/controller.php b/extensions/gii/generators/crud/templates/controller.php index f599189..e4d6c77 100644 --- a/extensions/gii/generators/crud/templates/controller.php +++ b/extensions/gii/generators/crud/templates/controller.php @@ -59,7 +59,7 @@ class <?= $controllerClass ?> extends <?= StringHelper::basename($generator->bas public function actionIndex() { $searchModel = new <?= isset($searchModelAlias) ? $searchModelAlias : $searchModelClass ?>; - $dataProvider = $searchModel->search($_GET); + $dataProvider = $searchModel->search(Yii::$app->request->getQueryParams()); return $this->render('index', [ 'dataProvider' => $dataProvider, diff --git a/framework/widgets/Menu.php b/framework/widgets/Menu.php index d5ff8ef..55e5431 100644 --- a/framework/widgets/Menu.php +++ b/framework/widgets/Menu.php @@ -158,7 +158,7 @@ class Menu extends Widget $this->route = Yii::$app->controller->getRoute(); } if ($this->params === null) { - $this->params = $_GET; + $this->params = Yii::$app->request->getQueryParams(); } $items = $this->normalizeItems($this->items, $hasActiveChild); $options = $this->options;