Skip to content

http_build_query type error is inaccurate #18400

Closed
@nielsdos

Description

@nielsdos

Description

The following code:

<?phpenum X{case A;} echohttp_build_query(X::A);

Resulted in this output:

Uncaught TypeError: http_build_query(): Argument #1 ($data) must be of type array, X given 

But I expected this output instead:

Uncaught TypeError: http_build_query(): Argument #1 ($data) must be of type array|object, X given 

Although array|object is also a bit inaccurate, so the exact wording needs to be thought through

PHP Version

8.4+

Operating System

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      close