Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Using $_ENV array in GitHub Actions

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?

like image 649
Luis Pedro Bonomi Avatar asked Apr 02 '26 03:04

Luis Pedro Bonomi


1 Answers

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

like image 65
scthi Avatar answered Apr 03 '26 17:04

scthi