8000 [Process] fixed uppercase ARGC and ARGV should also be skipped · symfony/symfony@0ced90c · GitHub
[go: up one dir, main page]

Skip to content

Commit 0ced90c

Browse files
rbaarsmafabpot
authored andcommitted
[Process] fixed uppercase ARGC and ARGV should also be skipped
1 parent 2381e0d commit 0ced90c

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

src/Symfony/Component/Process/Process.php

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -340,7 +340,7 @@ public function start(callable $callback = null, array $env = [])
340340

341341
$envPairs = [];
342342
foreach ($env as $k => $v) {
343-
if (false !== $v && 'argc' !== $k && 'argv' !== $k) {
343+
if (false !== $v && false === \in_array($k, ['argc', 'argv', 'ARGC', 'ARGV'], true)) {
344344
$envPairs[] = $k.'='.$v;
345345
}
346346
}
@@ -973,8 +973,6 @@ public function addErrorOutput(string $line)
973973

974974
/**
975975
* Gets the last output time in seconds.
976-
*
977-
* @return float|null The last output time in seconds or null if it isn't started
978976
*/
979977
public function getLastOutputTime(): ?float
980978
{
@@ -1503,8 +1501,6 @@ private function resetProcessData()
15031501
* @param int $signal A valid POSIX signal (see https://php.net/pcntl.constants)
15041502
* @param bool $throwException Whether to throw exception in case signal failed
15051503
*
1506-
* @return bool True if the signal was sent successfully, false otherwise
1507-
*
15081504
* @throws LogicException In case the process is not running
15091505
* @throws RuntimeException In case --enable-sigchild is activated and the process can't be killed
15101506
* @throws RuntimeException In case of failure

0 commit comments

Comments
 (0)
0