Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix PHP 8 introduced breaking change to call_user_func_array() #478

Merged
merged 1 commit into from
Jan 5, 2022

Conversation

Afnisse
Copy link
Contributor

@Afnisse Afnisse commented Dec 31, 2021

call_user_func_array() is used by HttpClient::getSideload(array $params = []), and since PHP 8^ introduced named arguments, the use of an associative array as arguments, will break the code since the array_merge does not support named arguments.

The fix is changing this line:

return call_user_func_array('array_merge', $sideloads);

To this:

return call_user_func_array('array_merge', array_values($sideloads));

@yoshdog yoshdog merged commit c4e499e into zendesk:master Jan 5, 2022
@schonhoff
Copy link

As mentioned in #470 maybe someone can update packagist? This would help a lot! :-)

@Afnisse Afnisse deleted the PHP8-FIX-BREAKING-CHANGES branch July 28, 2023 19:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants