8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5bd2403 commit acf8b83Copy full SHA for acf8b83
src/Symfony/Component/Process/Process.php
@@ -1530,14 +1530,14 @@ private function requireProcessIsTerminated(string $functionName)
1530
/**
1531
* Escapes a string to be used as a shell argument.
1532
*/
1533
- private function escapeArgument(string $argument): string
+ private function escapeArgument(?string $argument): string
1534
{
1535
+ if ('' === $argument || null === $argument) {
1536
+ return '""';
1537
+ }
1538
if ('\\' !== \DIRECTORY_SEPARATOR) {
1539
return "'".str_replace("'", "'\\''", $argument)."'";
1540
}
- if ('' === $argument = (string) $argument) {
- return '""';
- }
1541
if (false !== strpos($argument, "\0")) {
1542
$argument = str_replace("\0", '?', $argument);
1543
0 commit comments