Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

getenv() values missing from EnvironmentVariable::getEnvironmentVariables() #10

Open
karlwilbur opened this issue Jul 29, 2020 · 0 comments

Comments

@karlwilbur
Copy link

Using Environment::get(), one can obtain variables not included in Environment::getAll(). This odd behavior is caused by EnvironmentVariable::getEnvironmentVariables() searching only $_ENV and $_SERVER, whereas EnvironmentVariable::getEnvironmentVariable() searches $_ENV, $_SERVER, and getenv().

I suggest including a call to getenv() inside of EnvironmentVariable::getEnvironmentVariables() for the purpose of pulling in any variables that may not be included in $_ENV (such as when variables_order is set to "GPCS" thus excluding $_ENV).

I am going to make this code change and submit a PR.

@karlwilbur karlwilbur changed the title getenv values missing from EnvironmentVariable::getEnvironmentVariables() getenv() values missing from EnvironmentVariable::getEnvironmentVariables() Jul 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant