diff --git a/src/CmsSeoComponent.php b/src/CmsSeoComponent.php index 017175e..1260c7b 100644 --- a/src/CmsSeoComponent.php +++ b/src/CmsSeoComponent.php @@ -579,13 +579,16 @@ public function bootstrap($application) } - if (strpos($response->data, $this->countersContent) === false) { - //Для google page speed не показываем этот блок - if (!$this->isGooglePageSpeedRequest()) { - $replaces[""] = Html::tag('div', $this->countersContent, ['style' => 'display: none;', 'data-is-auto' => 'true']) . ""; + if ($this->countersContent) { + if (strpos($response->data, $this->countersContent) === false) { + //Для google page speed не показываем этот блок + if (!$this->isGooglePageSpeedRequest()) { + $replaces[""] = Html::tag('div', $this->countersContent, ['style' => 'display: none;', 'data-is-auto' => 'true']) . ""; + } } } + if ($replaces) { $response->data = strtr($response->data, $replaces); }