diff --git a/symfony/framework-bundle/3.3/public/index.php b/symfony/framework-bundle/3.3/public/index.php index 521b85d7..ab41c26e 100644 --- a/symfony/framework-bundle/3.3/public/index.php +++ b/symfony/framework-bundle/3.3/public/index.php @@ -15,7 +15,10 @@ if (!isset($_SERVER['APP_ENV'])) { (new Dotenv())->load(__DIR__.'/../.env'); } -if ($_SERVER['APP_DEBUG'] ?? ('prod' !== ($_SERVER['APP_ENV'] ?? 'dev'))) { +$env = $_SERVER['APP_ENV'] ?? 'dev'; +$debug = $_SERVER['APP_DEBUG'] ?? ('prod' !== $env); + +if ($debug) { umask(0000); Debug::enable(); @@ -29,7 +32,7 @@ if ($trustedHosts = $_SERVER['TRUSTED_HOSTS'] ?? false) { Request::setTrustedHosts(explode(',', $trustedHosts)); } -$kernel = new Kernel($_SERVER['APP_ENV'] ?? 'dev', $_SERVER['APP_DEBUG'] ?? ('prod' !== ($_SERVER['APP_ENV'] ?? 'dev'))); +$kernel = new Kernel($env, $debug); $request = Request::createFromGlobals(); $response = $kernel->handle($request); $response->send();