diff --git a/frontend/components/SeoComponent.php b/frontend/components/SeoComponent.php index d4ddfd5..a792682 100644 --- a/frontend/components/SeoComponent.php +++ b/frontend/components/SeoComponent.php @@ -25,10 +25,10 @@ public function getRobots() { - if (array_search(\Yii::$app->controller->id, $this->close)){ + if (array_search(\Yii::$app->controller->id, $this->close) !== false){ return 'noindex, nofollow'; } - if (array_search(\Yii::$app->request->pathInfo, $this->close)){ + if (array_search(\Yii::$app->request->pathInfo, $this->close) !== false){ return 'noindex, nofollow'; } -- libgit2 0.21.4