Skip to content

Commit ea8af67

Browse files
authored
Fix getenv() not working with .env.local.php
1 parent d9dc7a8 commit ea8af67

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@
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)
99
if (is_array($env = @include dirname(__DIR__).'/.env.local.php')) {
10+
foreach ($env as $name => $value) {
11+
putenv("$name=$value");
12+
}
1013
$_SERVER += $env;
1114
$_ENV += $env;
1215
} elseif (!class_exists(Dotenv::class)) {

0 commit comments

Comments
 (0)