Skip to content

Commit 6629ae5

Browse files
[WebServerBundle] Fix escaping of php binary with arguments
1 parent 8a1a9f9 commit 6629ae5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Symfony/Bundle/WebServerBundle/WebServer.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -146,11 +146,11 @@ public function isRunning($pidFile = null)
146146
private function createServerProcess(WebServerConfig $config)
147147
{
148148
$finder = new PhpExecutableFinder();
149-
if (false === $binary = $finder->find()) {
149+
if (false === $binary = $finder->find(false)) {
150150
throw new \RuntimeException('Unable to find the PHP binary.');
151151
}
152152

153-
$process = new Process(array($binary, '-dvariables_order=EGPCS', '-S', $config->getAddress(), $config->getRouter()));
153+
$process = new Process(array_merge(array($binary), $finder->findArguments(), array('-dvariables_order=EGPCS', '-S', $config->getAddress(), $config->getRouter())));
154154
$process->setWorkingDirectory($config->getDocumentRoot());
155155
$process->setTimeout(null);
156156

0 commit comments

Comments
 (0)