Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
[Process] fixed uppercase ARGC and ARGV should also be skipped
  • Loading branch information
rbaarsma authored and fabpot committed Dec 11, 2021
commit 0ced90cb38f3c03596cf02e265b93b7a5c808fa2
6 changes: 1 addition & 5 deletions src/Symfony/Component/Process/Process.php
Original file line number Diff line number Diff line change
Expand Up @@ -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($k, ['argc', 'argv', 'ARGC', 'ARGV'], true)) {
$envPairs[] = $k.'='.$v;
}
}
Expand Down Expand Up @@ -973,8 +973,6 @@ public function addErrorOutput(string $line)

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