We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3e36a18 commit 11def45Copy full SHA for 11def45
config/bootstrap.php
@@ -7,7 +7,9 @@
7
// Load cached env vars if the .env.local.php file exists
8
// Run "composer dump-env prod" to create it (requires symfony/flex >=1.2)
9
if (is_array($env = @include dirname(__DIR__).'/.env.local.php')) {
10
- $_ENV += $env;
+ foreach ($env as $k => $v) {
11
+ $_ENV[$k] = $_ENV[$k] ?? (isset($_SERVER[$k]) && 0 !== strpos($k, 'HTTP_') ? $_SERVER[$k] : $v);
12
+ }
13
} elseif (!class_exists(Dotenv::class)) {
14
throw new RuntimeException('Please run "composer require symfony/dotenv" to load the ".env" files configuring the application.');
15
} else {
0 commit comments