remove request param for env dev switch (use log instead for debug)

This commit is contained in:
Benjamin Dalsass
2022-07-26 14:31:00 +02:00
committed by bdalsass
parent 549bfcafd9
commit 8b8e6bab33

View File

@@ -85,12 +85,6 @@ if (file_exists(dirname(__DIR__).'/.env.local.php')) {
}
}
// Set debug mode only when necessary
if (utils::ReadParam('debug', 'false') === 'true')
{
$_SERVER['APP_DEBUG'] = true;
}
$_SERVER += $_ENV;
$_SERVER['APP_ENV'] = $_ENV['APP_ENV'] = (isset($_SERVER['APP_ENV']) ? $_SERVER['APP_ENV'] : (isset($_ENV['APP_ENV']) ? $_ENV['APP_ENV'] : null)) ?: 'prod';
$_SERVER['APP_DEBUG'] = isset($_SERVER['APP_DEBUG']) ? $_SERVER['APP_DEBUG'] : (isset($_ENV['APP_DEBUG']) ? $_ENV['APP_DEBUG'] : ('prod' !== $_SERVER['APP_ENV']));