Always using umask(0000) in debug mode (#210)

This commit is contained in:
Ryan Weaver
2017-10-10 01:46:31 -07:00
committed by Symfony
parent 5542ed8a4a
commit 56acc9cfb9
2 changed files with 6 additions and 6 deletions
+6 -3
View File
@@ -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();