[Process] Fix command escaping

This commit is contained in:
Jordi Boggiano 2012-03-18 13:07:34 +01:00
parent 3d84153d68
commit da3a2c4749

View File

@ -103,13 +103,7 @@ class ProcessBuilder
$options = $this->options;
$arguments = $this->arguments;
$command = array_shift($arguments);
$script = escapeshellcmd($command);
if ($arguments) {
$script .= ' '.implode(' ', array_map('escapeshellarg', $arguments));
}
$script = implode(' ', array_map('escapeshellarg', $this->arguments));
if ($this->inheritEnv) {
$env = $this->env ? $this->env + $_ENV : null;