Problem/Motivation
call_user_func_array calls callback function using named arguments if an array with keys is passed to $args and if the array passed has only values, arguments are passed positionally.
Steps to reproduce
1) Create a webform with any element.
2) Submit one response.
3) Run the drush command to export the webform submissions drush webform-export webform_id.
The error below is triggered:
[error] Error: Unknown named parameter $webform in call_user_func_array() (line 29 of /app/modules/contrib/webform/src/Commands/WebformCommands.php) #0 /app/modules/contrib/webform/src/Commands/WebformCommands.php(29): call_user_func_array(Array, Array)
See: https://www.php.net/manual/en/function.call-user-func-array.php#125953
Proposed resolution
Ensure that call_user_func_array works with PHP 8 as well.
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | 3214974-2.patch | 1.9 KB | paulocs |
Comments
Comment #2
paulocsComment #3
jrockowitz commentedI think this patch should be committed.
In the long term, I am hoping once Drupal 9.x is the only supported version for Webform 6.x, we only support Drush 10.x.
@see https://www.drush.org/latest/install/#drupal-compatibility
Comment #4
jrockowitz commented