Queue: hook_QueueTaskError missing some params
Setting up 4 parameters in the hook_QueueTaskError in an extension throws an exception stating the function got 2 parameters instead of 4.
Error:
WD php: ArgumentCountError: Too few arguments to function wmf_civicrm_civicrm_queueTaskError(), 2 passed in /home/cividev/buildkit/build/wmff/drupal/sites/all/modules/civicrm/CRM/Utils/Hook.php on line 276 and exactly 4 expected in wmf_civicrm_civicrm_queueTaskError() (line 612 of [error]
/home/cividev/buildkit/build/wmff/drupal/sites/default/civicrm/extensions/wmf-civicrm/wmf_civicrm.php).
ArgumentCountError: Too few arguments to function wmf_civicrm_civicrm_queueTaskError(), 2 passed in /home/cividev/buildkit/build/wmff/drupal/sites/all/modules/civicrm/CRM/Utils/Hook.php on line 276 and exactly 4 expected in wmf_civicrm_civicrm_queueTaskError() (line 612 of /home/cividev/buildkit/build/wmff/drupal/sites/default/civicrm/extensions/wmf-civicrm/wmf_civicrm.php).
Here is the code in CRM/Utils/Hooks.php
:
public static function queueTaskError(CRM_Queue_Queue $queue, $item, &$outcome, ?Throwable $exception) {
$null = NULL;
return self::singleton()->invoke(['job', 'params'], $queue, $item,
$outcome, $exception, $null, $null,
'civicrm_queueTaskError'
);
}