Skip to content

Commit e9ca038

Browse files
author
symfony-flex-server[bot]
authored
Merge pull request #727
2 parents f55d090 + 8ca8f49 commit e9ca038

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

symfony/framework-bundle/4.2/config/bootstrap.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
// Load cached env vars if the .env.local.php file exists
88
// Run "composer dump-env prod" to create it (requires symfony/flex >=1.2)
9-
if (is_array($env = @include dirname(__DIR__).'/.env.local.php') && ($_SERVER['APP_ENV'] ?? $_ENV['APP_ENV'] ?? $env['APP_ENV'] ?? null) === ($env['APP_ENV'] ?? null)) {
9+
if (is_array($env = @include dirname(__DIR__).'/.env.local.php') && (!isset($env['APP_ENV']) || ($_SERVER['APP_ENV'] ?? $_ENV['APP_ENV'] ?? $env['APP_ENV']) === $env['APP_ENV'])) {
1010
foreach ($env as $k => $v) {
1111
$_ENV[$k] = $_ENV[$k] ?? (isset($_SERVER[$k]) && 0 !== strpos($k, 'HTTP_') ? $_SERVER[$k] : $v);
1212
}

0 commit comments

Comments
 (0)