-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[Process] Fix ignoring of bad env var names #21776
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
Conversation
👍 |
$this->env = array(); | ||
foreach ($env as $key => $value) { | ||
$this->env[$key] = (string) $value; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is that logic removed or is it somewhere else?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see any place where it is moved, meaning it is a BC break (btw, I remember having commented on it for the refactoring in 3.3 too already)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
reverted
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does it mean that this should be reverted on 3.3 as well?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
only the array_filter
part - the string cast should not happen here because it removes the possibility to unset an env var which is a feature on master
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In fact, I did it in this PR: keep only the array_filter part.
That will conflict with master so we'll have a reminder.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To be clear, you still cast to string later in the process, after having checked for env removals?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes - see concat when calling putenv - and proc_open does it also (just confirmed)
21383da
to
3e1be89
Compare
3e1be89
to
406bb09
Compare
Thank you @nicolas-grekas. |
This PR was merged into the 3.2 branch. Discussion ---------- [Process] Fix ignoring of bad env var names | Q | A | ------------- | --- | Branch? | 3.2 | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | #21704 | License | MIT | Doc PR | - Patch backported from master, which is free from the linked issue. Commits ------- 406bb09 [Process] Fix ignoring of bad env var names
Patch backported from master, which is free from the linked issue.