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

calling getenv() without arguments should return the environment variables as an array #1567

Merged
merged 2 commits into from
Oct 16, 2015

Conversation

Tyrael
Copy link
Member

@Tyrael Tyrael commented Oct 12, 2015

see https://bugs.php.net/bug.php?id=69359 and #1214 for the past discussion which lead me to the current PR.

Get the value of an environment variable */
/* {{{ proto string getenv([string varname])
Get the value of an environment variable or every available environment variable
if no varname is present */
PHP_FUNCTION(getenv)
{
char *ptr, *str;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

str must be initialized to NULL here.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks, fixed

@bwoebi
Copy link
Member

bwoebi commented Oct 12, 2015

Looks fine to me… In case no-one complains maybe also as a self-contained feature right into 7.0.0 :-)

@php-pulls php-pulls merged commit 54670c8 into php:master Oct 16, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants