[Process] Fix regression introduced in #6620 / 880da01c49, fixes #7082

This commit is contained in:
Jordi Boggiano 2013-02-17 20:36:23 +01:00
parent d41fc8bb2d
commit 179cd58646

View File

@ -54,6 +54,10 @@ class Process
$this->commandline = $commandline;
$this->cwd = $cwd;
// on windows, if the cwd changed via chdir(), proc_open defaults to the dir where php was started
if (null === $this->cwd && defined('PHP_WINDOWS_VERSION_BUILD')) {
$this->cwd = getcwd();
}
if (null !== $env) {
$this->env = array();
foreach ($env as $key => $value) {