File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed
framework-bundle/3.3/public Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ if (!isset($_SERVER['APP_ENV'])) {
21
21
22
22
$ input = new ArgvInput ();
23
23
$ env = $ input ->getParameterOption (['--env ' , '-e ' ], $ _SERVER ['APP_ENV ' ] ?? 'dev ' );
24
- $ debug = ($ _SERVER ['APP_DEBUG ' ] ?? true ) !== ' 0 ' && !$ input ->hasParameterOption (['--no-debug ' , '' ]);
24
+ $ debug = ($ _SERVER ['APP_DEBUG ' ] ?? ( ' prod ' !== $ env )) && !$ input ->hasParameterOption (['--no-debug ' , '' ]);
25
25
26
26
if ($ debug ) {
27
27
umask (0000 );
Original file line number Diff line number Diff line change 12
12
(new Dotenv ())->load (__DIR__ .'/../.env ' );
13
13
}
14
14
15
- if ($ _SERVER ['APP_DEBUG ' ] ?? false ) {
15
+ if ($ _SERVER ['APP_DEBUG ' ] ?? ( ' prod ' !== ( $ _SERVER [ ' APP_ENV ' ] ?? ' dev ' )) ) {
16
16
umask (0000 );
17
17
18
18
Debug::enable ();
19
19
}
20
20
21
21
// Request::setTrustedProxies(['0.0.0.0/0'], Request::HEADER_FORWARDED);
22
22
23
- $ kernel = new Kernel ($ _SERVER ['APP_ENV ' ] ?? 'dev ' , $ _SERVER ['APP_DEBUG ' ] ?? false );
23
+ $ kernel = new Kernel ($ _SERVER ['APP_ENV ' ] ?? 'dev ' , $ _SERVER ['APP_DEBUG ' ] ?? ( ' prod ' !== ( $ _SERVER [ ' APP_ENV ' ] ?? ' dev ' )) );
24
24
$ request = Request::createFromGlobals ();
25
25
$ response = $ kernel ->handle ($ request );
26
26
$ response ->send ();
You can’t perform that action at this time.
0 commit comments