Problem/Motivation
5.1.8 release throws the following error if Charts API Example sub-module is enabled:
ArgumentCountError: Too few arguments to function Drupal\charts_api_example\Hook\ChartsApiExampleHooks::help(), 0 passed in .../modules/contrib/charts/modules/charts_api_example/charts_api_example.module on line 18 and exactly 2 expected in Drupal\charts_api_example\Hook\ChartsApiExampleHooks->help() (line 32 of .../modules/contrib/charts/modules/charts_api_example/src/Hook/ChartsApiExampleHooks.php).
Steps to reproduce
Enable Charts API Example submodule in 5.1.8 release
Proposed resolution
Add parameters in calling code.
Remaining tasks
Once I submit merge request, theoretically none
Issue fork charts-3562773
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #3
sean_fremouw commentedComment #4
andileco commentedThanks for this! Don't know why I didn't experience it. What version of core are you on?
Comment #5
sean_fremouw commented@andileco 10.5.8
Comment #6
andileco commentedComment #8
emerham commentedThis affects any hook_help in the code
modules/charts_api_example/src/Hook/ChartsApiExampleHooks.php: * Implements hook_help().
modules/charts_api_example/charts_api_example.module: * Implements hook_help().
modules/charts_blocks/charts_blocks.module: * Implements hook_help().
modules/charts_blocks/src/Hook/ChartsBlocksHooks.php: * Implements hook_help().
After applying the patch:
ArgumentCountError: Too few arguments to function Drupal\charts_blocks\Hook\ChartsBlocksHooks::help(), 0 passed in /var/www/html/docroot/modules/contrib/charts/modules/charts_blocks/charts_blocks.module on line 18 and exactly 2 expected in Drupal\charts_blocks\Hook\ChartsBlocksHooks->help() (line 32 of modules/contrib/charts/modules/charts_blocks/src/Hook/ChartsBlocksHooks.php).
I am also on Core version 10.5.8
Comment #9
andileco commentedOof, I wish these things would actually error for me or in Drupal CI. I'll fix these.
Comment #11
andileco commented