Open YuanchengJiang opened 2 months ago
From a quick look, that seems to be another output buffering issue.
I had a look, and what I believe is happening:
ob_start()
handler is registered, emitting some warning (undefined variable).php_output_discard_all()
.
https://github.com/php/php-src/blob/6b809c8890f983c587f62b8bbf6b7470341f05b3/main/main.c#L1335-L1337$b
triggers another error, again invoking php_output_discard_all()
.php_output_deactivate()
is called, and then we error again, which includes zend_bailout()
.
https://github.com/php/php-src/blob/6b809c8890f983c587f62b8bbf6b7470341f05b3/main/output.c#L762-L765op_start()
. However, OG(handlers)
has already been destroyed, so we get a NULL
pointer exception.With all of that said, I don't know what the best approach is to fix this. Maybe we just don't trigger the handler when cleaning the output? I really don't know much about output buffering.
Description
The following code:
Resulted in this output:
PHP Version
PHP 8.4.0-dev
Operating System
ubuntu 22.04