From 46fdfbbdef430ae98a458d581235d4cba0e42a68 Mon Sep 17 00:00:00 2001 From: Romain Neutron Date: Thu, 17 Apr 2014 14:25:45 +0200 Subject: [PATCH] [Process] Fix #10681, process are failing on Windows Server 2003 --- src/Symfony/Component/Process/Process.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Symfony/Component/Process/Process.php b/src/Symfony/Component/Process/Process.php index fcc0987696..66310026b3 100644 --- a/src/Symfony/Component/Process/Process.php +++ b/src/Symfony/Component/Process/Process.php @@ -233,10 +233,11 @@ class Process $commandline = $this->commandline; if (defined('PHP_WINDOWS_VERSION_BUILD') && $this->enhanceWindowsCompatibility) { - $commandline = 'cmd /V:ON /E:ON /C "('.$commandline.')"'; + $commandline = 'cmd /V:ON /E:ON /C "('.$commandline.')'; foreach ($this->processPipes->getFiles() as $offset => $filename) { - $commandline .= ' '.$offset.'>'.$filename; + $commandline .= ' '.$offset.'>'.ProcessUtils::escapeArgument($filename); } + $commandline .= '"'; if (!isset($this->options['bypass_shell'])) { $this->options['bypass_shell'] = true;