Skip to content
This repository was archived by the owner on Nov 27, 2020. It is now read-only.

Commit 126ce57

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 fc5e8d7 commit 126ce57

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

bin/console

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ set_time_limit(0);
1515
require __DIR__.'/../vendor/autoload.php';
1616

1717
$input = new ArgvInput();
18-
$env = $input->getParameterOption(['--env', '-e'], getenv('SYMFONY_ENV') ?: 'dev');
19-
$debug = getenv('SYMFONY_DEBUG') !== '0' && !$input->hasParameterOption(['--no-debug', '']) && $env !== 'prod';
18+
$env = $input->getParameterOption(['--env', '-e'], getenv('SYMFONY_ENV') ?: 'dev', true);
19+
$debug = getenv('SYMFONY_DEBUG') !== '0' && !$input->hasParameterOption('--no-debug', true) && $env !== 'prod';
2020

2121
if ($debug) {
2222
Debug::enable();

0 commit comments

Comments
 (0)