[Process] Dont use getenv(), it returns arrays and can introduce subtle breaks accros PHP versions
This commit is contained in:
parent
d731a2748f
commit
0d4bce6676
@ -1718,15 +1718,11 @@ class Process implements \IteratorAggregate
|
||||
|
||||
private function getDefaultEnv()
|
||||
{
|
||||
if (\PHP_VERSION_ID >= 70100) {
|
||||
$env = getenv();
|
||||
} else {
|
||||
$env = array();
|
||||
$env = array();
|
||||
|
||||
foreach ($_SERVER as $k => $v) {
|
||||
if (is_string($v) && false !== $v = getenv($k)) {
|
||||
$env[$k] = $v;
|
||||
}
|
||||
foreach ($_SERVER as $k => $v) {
|
||||
if (is_string($v) && false !== $v = getenv($k)) {
|
||||
$env[$k] = $v;
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user