File tree Expand file tree Collapse file tree 2 files changed +2
-5
lines changed Expand file tree Collapse file tree 2 files changed +2
-5
lines changed Original file line number Diff line number Diff line change 7
7
// Load cached env vars if the .env.local.php file exists
8
8
// Run "composer dump-env prod" to create it (requires symfony/flex >=1.2)
9
9
if (is_array ($ env = @include dirname (__DIR__ ).'/.env.local.php ' )) {
10
- $ _SERVER += $ env ;
11
10
$ _ENV += $ env ;
12
11
} elseif (!class_exists (Dotenv::class)) {
13
12
throw new RuntimeException ('Please run "composer require symfony/dotenv" to load the ".env" files configuring the application. ' );
46
45
}
47
46
}
48
47
48
+ $ _SERVER += $ _ENV ;
49
49
$ _SERVER ['APP_ENV ' ] = $ _ENV ['APP_ENV ' ] = ($ _SERVER ['APP_ENV ' ] ?? $ _ENV ['APP_ENV ' ] ?? null ) ?: 'dev ' ;
50
50
$ _SERVER ['APP_DEBUG ' ] = $ _SERVER ['APP_DEBUG ' ] ?? $ _ENV ['APP_DEBUG ' ] ?? 'prod ' !== $ _SERVER ['APP_ENV ' ];
51
51
$ _SERVER ['APP_DEBUG ' ] = $ _ENV ['APP_DEBUG ' ] = (int ) $ _SERVER ['APP_DEBUG ' ] || filter_var ($ _SERVER ['APP_DEBUG ' ], FILTER_VALIDATE_BOOLEAN ) ? '1 ' : '0 ' ;
Original file line number Diff line number Diff line change 7
7
// Load cached env vars if the .env.local.php file exists
8
8
// Run "composer dump-env prod" to create it (requires symfony/flex >=1.2)
9
9
if (is_array ($ env = @include dirname (__DIR__ ).'/.env.local.php ' )) {
10
- foreach ($ env as $ name => $ value ) {
11
- putenv ("$ name= $ value " );
12
- }
13
- $ _SERVER += $ env ;
14
10
$ _ENV += $ env ;
15
11
} elseif (!class_exists (Dotenv::class)) {
16
12
throw new RuntimeException ('Please run "composer require symfony/dotenv" to load the ".env" files configuring the application. ' );
19
15
(new Dotenv ())->loadEnv (dirname (__DIR__ ).'/.env ' );
20
16
}
21
17
18
+ $ _SERVER += $ _ENV ;
22
19
$ _SERVER ['APP_ENV ' ] = $ _ENV ['APP_ENV ' ] = ($ _SERVER ['APP_ENV ' ] ?? $ _ENV ['APP_ENV ' ] ?? null ) ?: 'dev ' ;
23
20
$ _SERVER ['APP_DEBUG ' ] = $ _SERVER ['APP_DEBUG ' ] ?? $ _ENV ['APP_DEBUG ' ] ?? 'prod ' !== $ _SERVER ['APP_ENV ' ];
24
21
$ _SERVER ['APP_DEBUG ' ] = $ _ENV ['APP_DEBUG ' ] = (int ) $ _SERVER ['APP_DEBUG ' ] || filter_var ($ _SERVER ['APP_DEBUG ' ], FILTER_VALIDATE_BOOLEAN ) ? '1 ' : '0 ' ;
You can’t perform that action at this time.
0 commit comments