File tree 2 files changed +3
-3
lines changed
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 21
21
(new Dotenv ())->load (__DIR__ .'/../.env ' );
22
22
}
23
23
24
- if ($ _SERVER ['APP_DEBUG ' ] ?? false ) {
24
+ if ($ _SERVER ['APP_DEBUG ' ] ?? ( ' prod ' !== ( $ _SERVER [ ' APP_ENV ' ] ?? ' dev ' )) ) {
25
25
umask (0000 );
26
26
27
27
Debug::enable ();
28
28
}
29
29
30
30
// Request::setTrustedProxies(['0.0.0.0/0'], Request::HEADER_FORWARDED);
31
31
32
- $ kernel = new Kernel ($ _SERVER ['APP_ENV ' ] ?? 'dev ' , $ _SERVER ['APP_DEBUG ' ] ?? false );
32
+ $ kernel = new Kernel ($ _SERVER ['APP_ENV ' ] ?? 'dev ' , $ _SERVER ['APP_DEBUG ' ] ?? ( ' prod ' !== ( $ _SERVER [ ' APP_ENV ' ] ?? ' dev ' )) );
33
33
$ request = Request::createFromGlobals ();
34
34
$ response = $ kernel ->handle ($ request );
35
35
$ response ->send ();
You can’t perform that action at this time.
0 commit comments