Skip to content

display_errors always being set to "STDERR", except when xDebug is involved. #6083

@WPprodigy

Description

@WPprodigy

This line feels strange to me:

ini_set( 'display_errors', function_exists( 'xdebug_debug_zval' ) ? false : 'STDERR' );

There's code above it that conditionally sets display_errors to other values. But then no matter what at the end of the function, it's set to either false or STDERR.

Additionally to this oddity, can we lowercase it to stderr? It is what PHP says is a valid value here: https://www.php.net/manual/en/errorfunc.configuration.php#ini.display-errors. And elsewhere in the codebase, WP CLI is also using lowercase stderr. We had code checking for stderr specifically, and this uppercase threw a bit of a curveball.

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