File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed
src/Symfony/Component/Process Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -57,15 +57,15 @@ public static function escapeArgument($argument)
57
57
$ part .= '\\' ;
58
58
}
59
59
$ part = escapeshellarg ($ part );
60
- if ($ part [0 ] === '" ' && $ part [strlen ($ part ) - 1 ] === ' " ' ) {
60
+ if (' " ' === $ part [0 ] && '" ' === $ part [strlen ($ part ) - 1 ]) {
61
61
$ part = substr ($ part , 1 , -1 );
62
62
$ quote = true ;
63
63
}
64
64
$ escapedArgument .= $ part ;
65
65
}
66
66
}
67
67
if ($ quote ) {
68
- $ escapedArgument = '" ' . $ escapedArgument . '" ' ;
68
+ $ escapedArgument = '" ' . $ escapedArgument. '" ' ;
69
69
}
70
70
71
71
return $ escapedArgument ;
Original file line number Diff line number Diff line change @@ -27,6 +27,7 @@ public function dataArguments()
27
27
{
28
28
if (defined ('PHP_WINDOWS_VERSION_BUILD ' )) {
29
29
return array (
30
+ array ('"\"php\" \"-v\"" ' , '"php" "-v" ' ),
30
31
array ('"foo bar" ' , 'foo bar ' ),
31
32
array ('^%"path"^% ' , '%path% ' ),
32
33
array ('"<|>" \\"" " \\"" \'f" ' , '<|>" " \'f ' ),
@@ -36,6 +37,7 @@ public function dataArguments()
36
37
}
37
38
38
39
return array (
40
+ array ("' \"php \" \"-v \"' " , '"php" "-v" ' ),
39
41
array ("'foo bar' " , 'foo bar ' ),
40
42
array ("'%path%' " , '%path% ' ),
41
43
array ("'<|> \" \"' \\''f' " , '<|>" " \'f ' ),
You can’t perform that action at this time.
0 commit comments