Skip to content

Regression - incorrect parameter name for base64_decode() #9428

@dktapps

Description

@dktapps

Bug description

Error messages involving wrong types for base64_decode() started reporting different parameter names sometime between 1.10.16 and 1.10.18.

We can see from php --rf base64_decode that the parameter name should be $string:

$ php --rf base64_decode
Function [ <internal:standard> function base64_decode ] {

  - Parameters [2] {
    Parameter #0 [ <required> string $string ]
    Parameter #1 [ <optional> bool $strict = false ]
  }
  - Return [ string|false ]
}

But the error message claims the parameter is called $str.

Code snippet that reproduces the problem

https://phpstan.org/r/7dba8189-f75d-46cd-a6ac-9a6d685e5f9c

Expected output

Parameter #1 $string of function base64_decode expects string, int given.

Did PHPStan help you today? Did it make you happy in any way?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions