Skip to content

Commit 3fc49fd

Browse files
authored
Update CodeIgniter.php
Use getenv instead of $_SESSION in detectEnvironment
1 parent d75e426 commit 3fc49fd

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

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', $_SERVER['CI_ENVIRONMENT'] ?? 'production');
531+
define('ENVIRONMENT', getenv('CI_ENVIRONMENT') ?? 'production');
532532
}
533533
}
534534

0 commit comments

Comments
 (0)