8000 [Process] intersect with getenv() in case-insensitive manner to get d… · symfony/symfony@cba3bb2 · GitHub
[go: up one dir, main page]

Skip to content

Commit cba3bb2

Browse files
committed
[Process] intersect with getenv() in case-insensitive manner to get default envs
- since environment variables are case-insensitive in Windows, all envs should be compared in case-insensitive manner
1 parent af881a9 commit cba3bb2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Symfony/Component/Process/Process.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1659,7 +1659,7 @@ private function replacePlaceholders(string $commandline, array $env)
16591659
private function getDefaultEnv(): array
16601660
{
16611661
$env = getenv();
1662-
$env = array_intersect_key($env, $_SERVER) ?: $env;
1662+
$env = array_intersect_ukey($env, $_SERVER, 'strcasecmp') ?: $env;
16631663

16641664
return $_ENV + $env;
16651665
}

0 commit comments

Comments
 (0)
0