From acf8b8338a78500c594aae9250581a7a003fdffe Mon Sep 17 00:00:00 2001 From: Valentin Date: Sun, 14 Oct 2018 23:07:30 +0300 Subject: [PATCH] Remove Process::escapeArgument argument type hint --- src/Symfony/Component/Process/Process.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Symfony/Component/Process/Process.php b/src/Symfony/Component/Process/Process.php index cf551ef517900..f6701727424d7 100644 --- a/src/Symfony/Component/Process/Process.php +++ b/src/Symfony/Component/Process/Process.php @@ -1530,14 +1530,14 @@ private function requireProcessIsTerminated(string $functionName) /** * Escapes a string to be used as a shell argument. */ - private function escapeArgument(string $argument): string + private function escapeArgument(?string $argument): string { + if ('' === $argument || null === $argument) { + return '""'; + } if ('\\' !== \DIRECTORY_SEPARATOR) { return "'".str_replace("'", "'\\''", $argument)."'"; } - if ('' === $argument = (string) $argument) { - return '""'; - } if (false !== strpos($argument, "\0")) { $argument = str_replace("\0", '?', $argument); } pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy