Skip to content

Commit f4fb6b8

Browse files
committedNov 4, 2024
Merge branch '6.4' into 7.1
* 6.4: [Validator] Fix 58691 (missing plural-options in serbian language translation) profiler form data collector extart value property if it is setted [Process] Fix escaping /X arguments on Windows [Config] Handle Phar absolute path in `FileLocator` [Runtime] Remove unused `SKIPIF` from `dotenv_overload.phpt`
2 parents 284aead + 0776b99 commit f4fb6b8

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed
 

‎Process.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -1631,7 +1631,7 @@ private function escapeArgument(?string $argument): string
16311631
if (str_contains($argument, "\0")) {
16321632
$argument = str_replace("\0", '?', $argument);
16331633
}
1634-
if (!preg_match('/[\/()%!^"<>&|\s]/', $argument)) {
1634+
if (!preg_match('/[()%!^"<>&|\s]/', $argument)) {
16351635
return $argument;
16361636
}
16371637
$argument = preg_replace('/(\\\\+)$/', '$1$1', $argument);

‎Tests/ProcessTest.php

+6-1
Original file line numberDiff line numberDiff line change
@@ -1470,7 +1470,12 @@ public function testGetCommandLine()
14701470
{
14711471
$p = new Process(['/usr/bin/php']);
14721472

1473-
$expected = '\\' === \DIRECTORY_SEPARATOR ? '"/usr/bin/php"' : "'/usr/bin/php'";
1473+
$expected = '\\' === \DIRECTORY_SEPARATOR ? '/usr/bin/php' : "'/usr/bin/php'";
1474+
$this->assertSame($expected, $p->getCommandLine());
1475+
1476+
$p = new Process(['cd', '/d']);
1477+
1478+
$expected = '\\' === \DIRECTORY_SEPARATOR ? 'cd /d' : "'cd' '/d'";
14741479
$this->assertSame($expected, $p->getCommandLine());
14751480
}
14761481

0 commit comments

Comments
 (0)
Please sign in to comment.