Skip to content

Commit 61b1696

Browse files
authored
fix: use env() instead of $_SERVER in detectEnvironment()
1 parent 3fc49fd commit 61b1696

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

system/CodeIgniter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -528,7 +528,7 @@ protected function detectEnvironment()
528528
{
529529
// Make sure ENVIRONMENT isn't already set by other means.
530530
if (! defined('ENVIRONMENT')) {
531-
define('ENVIRONMENT', getenv('CI_ENVIRONMENT') ?? 'production');
531+
define('ENVIRONMENT', env('CI_ENVIRONMENT', 'production'));
532532
}
533533
}
534534

0 commit comments

Comments
 (0)