Skip to content

Conversation

matzeeable
Copy link

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.

2 participants