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
[Process] fixed uppercase ARGC and ARGV should also be skipped #44538
Conversation
Hey! I think @andrei0x309 has recently worked with this code. Maybe they can help review this? Cheers! Carsonbot |
@@ -340,7 +340,7 @@ public function start(callable $callback = null, array $env = []) | |||
|
|||
$envPairs = []; | |||
foreach ($env as $k => $v) { | |||
if (false !== $v && 'argc' !== $k && 'argv' !== $k) { | |||
if (false !== $v && false === \in_array(strtolower($k), ['argc', 'argv'], true)) { |
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'd prefer not calling strtolower for that. Let's use this instead if you don't mind:
if (false !== $v && false === \in_array($k, ['argc', 'argv', 'ARGC', 'ARGV'], true)) {
Thank you @rbaarsma. |
@nicolas-grekas I haven't fully debugged how, but it was coming from liuggio/fastest, which executes unit tests in parallel processes. I can dive in deeper that maybe they are doing it wrong and shouldn't do it, but still that should not break Symfony I guess ;) Also see the related issue on how to reproduce |
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
uppercase env ARGC and ARGV were showing a warning:
This PR fixes that by adding upon the existing functionality blocking argv and argc env vars to become part of the eventual env vars.