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

Skip to content

Commit f48f19d

Browse files
bohanyangfabpot
authored andcommitted
[FrameworkBundle] Fix about command not showing .env vars
1 parent 28f4c09 commit f48f19d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/Symfony/Bundle/FrameworkBundle/Command/AboutCommand.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -130,9 +130,9 @@ private static function isExpired(string $date): bool
130130
private static function getDotenvVars(): array
131131
{
132132
$vars = [];
133-
foreach (explode(',', getenv('SYMFONY_DOTENV_VARS')) as $name) {
134-
if ('' !== $name && false !== $value = getenv($name)) {
135-
$vars[$name] = $value;
133+
foreach (explode(',', $_SERVER['SYMFONY_DOTENV_VARS'] ?? $_ENV['SYMFONY_DOTENV_VARS'] ?? '') as $name) {
134+
if ('' !== $name && isset($_ENV[$name])) {
135+
$vars[$name] = $_ENV[$name];
136136
}
137137
}
138138

0 commit comments

Comments
 (0)