Skip to content

Commit

Permalink
Merge branch '6.4' into 7.1
Browse files Browse the repository at this point in the history
* 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`
  • Loading branch information
nicolas-grekas committed Nov 4, 2024
2 parents 284aead + 0776b99 commit f4fb6b8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Process.php
Original file line number Diff line number Diff line change
Expand Up @@ -1631,7 +1631,7 @@ private function escapeArgument(?string $argument): string
if (str_contains($argument, "\0")) {
$argument = str_replace("\0", '?', $argument);
}
if (!preg_match('/[\/()%!^"<>&|\s]/', $argument)) {
if (!preg_match('/[()%!^"<>&|\s]/', $argument)) {
return $argument;
}
$argument = preg_replace('/(\\\\+)$/', '$1$1', $argument);
Expand Down
7 changes: 6 additions & 1 deletion Tests/ProcessTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -1470,7 +1470,12 @@ public function testGetCommandLine()
{
$p = new Process(['/usr/bin/php']);

$expected = '\\' === \DIRECTORY_SEPARATOR ? '"/usr/bin/php"' : "'/usr/bin/php'";
$expected = '\\' === \DIRECTORY_SEPARATOR ? '/usr/bin/php' : "'/usr/bin/php'";
$this->assertSame($expected, $p->getCommandLine());

$p = new Process(['cd', '/d']);

$expected = '\\' === \DIRECTORY_SEPARATOR ? 'cd /d' : "'cd' '/d'";
$this->assertSame($expected, $p->getCommandLine());
}

Expand Down

0 comments on commit f4fb6b8

Please sign in to comment.