]> gitweb.erp-flowers.ru Git - erp24_rep/yii-erp24/.git/commitdiff
Добавлена проверка на переменую окружения
authorfomichev <vladimir.fomichev@erp-flowers.ru>
Thu, 6 Feb 2025 09:42:40 +0000 (12:42 +0300)
committerfomichev <vladimir.fomichev@erp-flowers.ru>
Thu, 6 Feb 2025 09:42:40 +0000 (12:42 +0300)
erp24/config/env.php
erp24/services/TelegramService.php

index 7d2367f2fa696a155ce70ad6f2957f86db63ed0c..e54f6073831d9cc45f301113380d7aa94f30358c 100644 (file)
@@ -10,4 +10,6 @@ try {
     }
 } catch (\Dotenv\Exception\InvalidPathException $e) {
     //Yii::error('Файл .env не найден: ' . $e->getMessage());
+} finally {
+    $_ENV['APP_ENV'] = 'development';
 }
index 4cfb70bcc795971563e4b1bcca895604bcfa1aeb..7db12d6a40168a396735f8afb9f6c32b5390a12f 100644 (file)
@@ -41,7 +41,7 @@ class TelegramService
 
     public static function isDevEnv(): bool
     {
-        return getenv('APP_ENV') === 'development';
+        return getenv('APP_ENV') === 'development' || $_ENV['APP_ENV'] == 'development';
     }