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.