Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit6935e5a

Browse files
bug#25559 [Process] Dont use getenv(), it returns arrays and can introduce subtle breaks accros PHP versions (nicolas-grekas)
This PR was merged into the 3.3 branch.Discussion----------[Process] Dont use getenv(), it returns arrays and can introduce subtle breaks accros PHP versions| Q | A| ------------- | ---| Branch? | 3.3| Bug fix? | yes| New feature? | no| BC breaks? | no| Deprecations? | no| Tests pass? | yes| Fixed tickets |#25511| License | MIT| Doc PR | -Commits-------0d4bce6 [Process] Dont use getenv(), it returns arrays and can introduce subtle breaks accros PHP versions
2 parentsd731a27 +0d4bce6 commit6935e5a

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

‎src/Symfony/Component/Process/Process.php‎

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1718,15 +1718,11 @@ private function escapeArgument($argument)
17181718

17191719
privatefunctiongetDefaultEnv()
17201720
{
1721-
if (\PHP_VERSION_ID >=70100) {
1722-
$env =getenv();
1723-
}else {
1724-
$env =array();
1721+
$env =array();
17251722

1726-
foreach ($_SERVERas$k =>$v) {
1727-
if (is_string($v) &&false !==$v =getenv($k)) {
1728-
$env[$k] =$v;
1729-
}
1723+
foreach ($_SERVERas$k =>$v) {
1724+
if (is_string($v) &&false !==$v =getenv($k)) {
1725+
$env[$k] =$v;
17301726
}
17311727
}
17321728

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp