From 2330ab779bd1a778d0573dc5acd017493e35f6be Mon Sep 17 00:00:00 2001 From: arnedem Date: Thu, 22 Sep 2022 09:38:38 +0200 Subject: [PATCH] Fix: SeoService correct get env --- src/services/SeoService.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/services/SeoService.php b/src/services/SeoService.php index 740f304..ba32ede 100644 --- a/src/services/SeoService.php +++ b/src/services/SeoService.php @@ -6,6 +6,7 @@ use craft\base\Component; use craft\base\Element; use craft\base\Field; +use craft\helpers\App; use ether\seo\fields\SeoField; use ether\seo\models\data\SeoData; @@ -22,7 +23,7 @@ public function injectRobots () { $headers = Craft::$app->getResponse()->getHeaders(); - $env = getenv('ENVIRONMENT') ?? getenv('CRAFT_ENVIRONMENT'); + $env = App::env('ENVIRONMENT') ?? App::env('CRAFT_ENVIRONMENT'); // Always noindex except on production environment if ($env !== 'production')