You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The module argument is not working at all because there is a type mismatch. The strtolower() function is executed on an array returned from $input->getArgument('module'). Thus the complete if ($modules) { … } branch is never executed and PHP emits a warning.
So we end up with the same behaviour as drupal dm without the module name(s) but with a big warning.
How to reproduce
Checked on Drupal Console 1.9.1 (Drupal Core version 8.7.5)
$ drupal dm token
ID Name Package Version Schema version Status Origin
action Actions Core 8.7.5 Uninstalled core
action_form_ajax_test action_form_ajax_test Core 8.7.5 Uninstalled core
aggregator Aggregator Core 8.7.5 Uninstalled core
aggregator_test Aggregator module tests Testing 8.7.5 Uninstalled core
aggregator_test_views Aggregator test views Testing 8.7.5 Uninstalled core
automated_cron Automated Cron Core 8.7.5 8000 Installed core
… snip …
webform_test_third_party_settings Webform module third party settings tests Testing 8.x-5.3 Uninstalled no core
webform_test_translation Webform module translation tests Testing 8.x-5.3 Uninstalled no core
webform_test_translation_lingotek Webform module translation lingotek tests Testing 8.x-5.3 Uninstalled no core
webform_test_validate Webform module validate tests Testing 8.x-5.3 Uninstalled no core
webform_test_views Webform module Views tests Testing 8.x-5.3 Uninstalled no core
webform_test_wizard_custom Webform module wizard custom tests Testing 8.x-5.3 Uninstalled no core
webform Webform Webform 8.x-5.3 8169 Installed no core
[ERROR] <em class="placeholder">Warning</em>: strtolower() expects parameter
1 to be string, array given in <em
class="placeholder">Drupal\Console\Command\Debug\ModuleCommand->exec
ute()</em> (line <em class="placeholder">87</em> of <em
class="placeholder">/app/vendor/drupal/console/src/Command/Debug/Module
Command.php</em>). <pre
class="backtrace">Drupal\Console\Command\Debug\ModuleCommand->execut
e(Object, Object) (Line: 255)
Symfony\Component\Console\Command\Command->run(Object, Object)
(Line: 987)
Symfony\Component\Console\Application->doRunCommand(Object, Object,
Object) (Line: 255)
Symfony\Component\Console\Application->doRun(Object, Object) (Line:
188)
Drupal\Console\Core\Application->doRun(Object, Object) (Line: 64)
Drupal\Console\Application->doRun(Object, Object) (Line: 148)
Symfony\Component\Console\Application->run() (Line: 89)
require('/app/vendor/drupal/console/bin/drupal.php') (Line:
4)
</pre>
Solution
Inside the if ($modules) { … } branch the command iterates over every given module, starting with line 93:
foreach ($modulesas$module) {
Here we can apply strtolower safely to every $module.
The text was updated successfully, but these errors were encountered:
Problem/Motivation
The module argument is not working at all because there is a type mismatch. The
strtolower()
function is executed on an array returned from$input->getArgument('module')
. Thus the completeif ($modules) { … }
branch is never executed and PHP emits a warning.So we end up with the same behaviour as
drupal dm
without the module name(s) but with a big warning.How to reproduce
Checked on Drupal Console 1.9.1 (Drupal Core version 8.7.5)
Solution
Inside the
if ($modules) { … }
branch the command iterates over every given module, starting with line 93:Here we can apply
strtolower
safely to every$module
.The text was updated successfully, but these errors were encountered: