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: use spread operator instead of call_user_func_array to be compat… #728

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

matzeeable
Copy link
Contributor

Q A
Bug fix? yes
New feature? no
BC breaks? no
Related Issue humbug/php-scoper#294
Need Doc update no

Describe your change

Use sprintf() with spread operator instead of call_user_func_array().

What problem is this fixing?

When using https://github.com/humbug/php-scoper it modifies the following code:

return call_user_func_array('sprintf', $arguments);

to:

return \call_user_func_array('PhpScoper\\Vendor\\sprintf', $arguments);

This leads to an PHP fatal error as the PhpScoper\Vendor\sprintf function is not available.

@theofidry
Copy link

theofidry commented May 5, 2024

I think it's a good change. Nonetheless, this specific change was caused by a bug which is fixed in humbug/php-scoper#1028.

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.

None yet

2 participants