Skip to content

Incorrect signature for the set_error_handler() callback in PHP >= 8 #6619

@johnbillion

Description

@johnbillion

Bug report

Since PHP 8 the $errcontext parameter is no longer passed to the callback registered with set_error_handler(). This is not detected by PHPStan.

Code snippet that reproduces the problem

Expected output

The $errcontext parameter of the callback signature should be conditional depending on the PHP version.

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

Always :-)

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