Skip to content

Commit 60c0fc3

Browse files
committed
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).
1 parent c7a4138 commit 60c0fc3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

symfony/console/3.3/bin/console

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ if (!isset($_SERVER['APP_ENV'])) {
2323
}
2424

2525
$input = new ArgvInput();
26-
$env = $input->getParameterOption(['--env', '-e'], $_SERVER['APP_ENV'] ?? 'dev');
27-
$debug = ($_SERVER['APP_DEBUG'] ?? ('prod' !== $env)) && !$input->hasParameterOption(['--no-debug', '']);
26+
$env = $input->getParameterOption(['--env', '-e'], $_SERVER['APP_ENV'] ?? 'dev', true);
27+
$debug = ($_SERVER['APP_DEBUG'] ?? ('prod' !== $env)) && !$input->hasParameterOption('--no-debug', true);
2828

2929
if ($debug) {
3030
umask(0000);

0 commit comments

Comments
 (0)