Skip to content

Commit

Permalink
#7106 - fix for ZTS builds
Browse files Browse the repository at this point in the history
  • Loading branch information
Julien Moulin committed Mar 20, 2013
1 parent e047ac8 commit 11d3855
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/Symfony/Component/Process/Process.php
Expand Up @@ -131,8 +131,13 @@ public function __construct($commandline, $cwd = null, array $env = null, $stdin

$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')) {
// on gnu/linux, PHP builds with --enable-maintainer-zts are also affected
// @see : https://bugs.php.net/bug.php?id=51800
// @see : https://bugs.php.net/bug.php?id=50524

if (null === $this->cwd && (defined('ZEND_THREAD_SAFE') || defined('PHP_WINDOWS_VERSION_BUILD'))) {
$this->cwd = getcwd();
}
if (null !== $env) {
Expand Down

0 comments on commit 11d3855

Please sign in to comment.