While using GitHub actions I get an undefined index error in $_ENV('ENV') but when I use getenv('ENV') I actually get the variable I'm looking for. How can I fix that?
If your $_ENV array is mysteriously empty, but you still see the variables when calling getenv() or in your phpinfo(), check your http://us.php.net/manual/en/ini.core.php#ini.variables-order ini setting to ensure it includes "E" in the string.
https://www.php.net/manual/en/reserved.variables.environment.php#98113
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With