File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
src/Symfony/Component/Process Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -1530,14 +1530,14 @@ private function requireProcessIsTerminated(string $functionName)
15301530 /**
15311531 * Escapes a string to be used as a shell argument.
15321532 */
1533- private function escapeArgument (string $ argument ): string
1533+ private function escapeArgument (? string $ argument ): string
15341534 {
1535+ if ('' === $ argument || null === $ argument ) {
1536+ return '"" ' ;
1537+ }
15351538 if ('\\' !== \DIRECTORY_SEPARATOR ) {
15361539 return "' " .str_replace ("' " , "' \\'' " , $ argument )."' " ;
15371540 }
1538- if ('' === $ argument = (string ) $ argument ) {
1539- return '"" ' ;
1540- }
15411541 if (false !== strpos ($ argument , "\0" )) {
15421542 $ argument = str_replace ("\0" , '? ' , $ argument );
15431543 }
You can’t perform that action at this time.
0 commit comments