Skip to content

Commit a1a6358

Browse files
authored
Merge pull request #6257 from fcosrno/fix-env-detect
fix: use getenv() instead of $_SERVER in detectEnvironment()
2 parents 4b7306f + 61b1696 commit a1a6358

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
@@ -545,7 +545,7 @@ protected function detectEnvironment()
545545
{
546546
// Make sure ENVIRONMENT isn't already set by other means.
547547
if (! defined('ENVIRONMENT')) {
548-
define('ENVIRONMENT', $_SERVER['CI_ENVIRONMENT'] ?? 'production');
548+
define('ENVIRONMENT', env('CI_ENVIRONMENT', 'production'));
549549
}
550550
}
551551

0 commit comments

Comments
 (0)