From 60c0fc35b3945534e28ad6ef8e4b66f2ecd7bd59 Mon Sep 17 00:00:00 2001 From: Christophe Coevoet Date: Thu, 15 Feb 2018 12:16:49 +0100 Subject: [PATCH] Improve the console script - look for the --env and --no-debug only before a -- separator, to respect the support for -- - avoid passing an empty string as parameter option name (which would never match anyway, but causes php warning is some Symfony versions instead of being ignored silently). --- symfony/console/3.3/bin/console | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/symfony/console/3.3/bin/console b/symfony/console/3.3/bin/console index d026a6d2..14932be6 100755 --- a/symfony/console/3.3/bin/console +++ b/symfony/console/3.3/bin/console @@ -23,8 +23,8 @@ if (!isset($_SERVER['APP_ENV'])) { } $input = new ArgvInput(); -$env = $input->getParameterOption(['--env', '-e'], $_SERVER['APP_ENV'] ?? 'dev'); -$debug = ($_SERVER['APP_DEBUG'] ?? ('prod' !== $env)) && !$input->hasParameterOption(['--no-debug', '']); +$env = $input->getParameterOption(['--env', '-e'], $_SERVER['APP_ENV'] ?? 'dev', true); +$debug = ($_SERVER['APP_DEBUG'] ?? ('prod' !== $env)) && !$input->hasParameterOption('--no-debug', true); if ($debug) { umask(0000);