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?
Asked
Active
Viewed 1,090 times
3

Luis Pedro Bonomi
- 117
- 1
- 7
-
2Does this answer your question? [Why is my $\_ENV empty?](https://stackoverflow.com/questions/3780866/why-is-my-env-empty) – M. Eriksson Dec 22 '19 at 16:30
1 Answers
1
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

scthi
- 2,205
- 1
- 18
- 14