Skip to content

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

Closed
@tkuschel

Description

@tkuschel

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions