diff --git a/src/Core.php b/src/Core.php index 0a27da7..b636e8e 100644 --- a/src/Core.php +++ b/src/Core.php @@ -536,7 +536,7 @@ public static function loadApplicationEnv(string $directory) { \Dotenv\Dotenv::createUnsafeImmutable($directory)->safeLoad(); - if ($_ENV['APP_ENV'] !== 'production') { + if (($_ENV['APP_ENV'] ?? getenv('APP_ENV')) !== 'production') { foreach ($_ENV as $key => $value) { putenv(assignment: $key); unset($_ENV[$key], $_SERVER[$key]);