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

number of parameters at ArgumentCountError is always 2 in exception #7

Closed
tkuschel opened this issue Jun 2, 2024 · 1 comment
Closed

Comments

@tkuschel
Copy link

tkuschel commented Jun 2, 2024

The exception ArgumentCountError gives wrong given parameter length.
When a function is called with wrong amounts of parameters, e.g. static BCMath::scale(4,2,3), in the magic static function __callStatic($name, $arguments) line 373 throws an error. That is ok, but the func_num_args() used - only returns the number of parameters of the called function and is always 2 in that case. That should be the amount of $arguments (array).
You are probably wondering why I came up with this? My editor shows me an error that the parameters for the __callStatic() magic function should always be the amount of 2.
I fixed it with PR #6

@terrafrost
Copy link
Member

Fixed with #6

Thanks!

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

No branches or pull requests

2 participants