mirror of
https://github.com/symfony/recipes.git
synced 2026-09-18 02:26:31 +03:00
Always using umask(0000) in debug mode (#210)
This commit is contained in:
@@ -7,7 +7,6 @@ use Symfony\Component\Console\Input\ArgvInput;
|
||||
use Symfony\Component\Debug\Debug;
|
||||
use Symfony\Component\Dotenv\Dotenv;
|
||||
|
||||
umask(0000);
|
||||
set_time_limit(0);
|
||||
|
||||
require __DIR__.'/../vendor/autoload.php';
|
||||
@@ -24,8 +23,12 @@ $input = new ArgvInput();
|
||||
$env = $input->getParameterOption(['--env', '-e'], $_SERVER['APP_ENV'] ?? 'dev');
|
||||
$debug = ($_SERVER['APP_DEBUG'] ?? true) !== '0' && !$input->hasParameterOption(['--no-debug', '']);
|
||||
|
||||
if ($debug && class_exists(Debug::class)) {
|
||||
Debug::enable();
|
||||
if ($debug) {
|
||||
umask(0000);
|
||||
|
||||
if (class_exists(Debug::class)) {
|
||||
Debug::enable();
|
||||
}
|
||||
}
|
||||
|
||||
$kernel = new Kernel($env, $debug);
|
||||
|
||||
@@ -13,9 +13,6 @@ if (!isset($_SERVER['APP_ENV'])) {
|
||||
}
|
||||
|
||||
if ($_SERVER['APP_DEBUG'] ?? false) {
|
||||
// WARNING: You should setup permissions the proper way!
|
||||
// REMOVE the following PHP line and read
|
||||
// https://symfony.com/doc/current/book/installation.html#checking-symfony-application-configuration-and-setup
|
||||
umask(0000);
|
||||
|
||||
Debug::enable();
|
||||
|
||||
Reference in New Issue
Block a user