Skip to content

Commit 6c99204

Browse files
Merge branch '4.4' into 5.3
* 4.4: fix cs Update validators.lv.xlf Update validators.uz.xlf [ExpressionLanguage] Fix LexerTest number types [Process] intersect with getenv() to populate default envs Improve CI script a bit [Cache] fix dbindex Redis Never rely on dynamic properties
2 parents 668ff7f + a8d1a7b commit 6c99204

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

Process.php

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1659,13 +1659,8 @@ private function replacePlaceholders(string $commandline, array $env)
16591659

16601660
private function getDefaultEnv(): array
16611661
{
1662-
$env = [];
1663-
1664-
foreach ($_SERVER as $k => $v) {
1665-
if (\is_string($v) && false !== $v = getenv($k)) {
1666-
$env[$k] = $v;
1667-
}
1668-
}
1662+
$env = getenv();
1663+
$env = array_intersect_key($env, $_SERVER) ?: $env;
16691664

16701665
foreach ($_ENV as $k => $v) {
16711666
if (\is_string($v)) {

0 commit comments

Comments
 (0)