Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 11d3855

Browse files
author
Julien Moulin
committed
#7106 - fix for ZTS builds
1 parent e047ac8 commit 11d3855

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/Symfony/Component/Process/Process.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,8 +131,13 @@ public function __construct($commandline, $cwd = null, array $env = null, $stdin
131131

132132
$this->commandline = $commandline;
133133
$this->cwd = $cwd;
134+
134135
// on windows, if the cwd changed via chdir(), proc_open defaults to the dir where php was started
135-
if (null === $this->cwd && defined('PHP_WINDOWS_VERSION_BUILD')) {
136+
// on gnu/linux, PHP builds with --enable-maintainer-zts are also affected
137+
// @see : https://bugs.php.net/bug.php?id=51800
138+
// @see : https://bugs.php.net/bug.php?id=50524
139+
140+
if (null === $this->cwd && (defined('ZEND_THREAD_SAFE') || defined('PHP_WINDOWS_VERSION_BUILD'))) {
136141
$this->cwd = getcwd();
137142
}
138143
if (null !== $env) {

0 commit comments

Comments
 (0)