From: Nikita Popov Date: Wed, 4 Nov 2020 15:03:39 +0000 (+0100) Subject: End output handlers in preload shutdown X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=7c7c6b0d73a4c8047b6197d27729fef1de81afdd;p=php End output handlers in preload shutdown Same as in php_request_shutdown(), we need to end any active output handlers, as these may no longer be safe to execute lateron. --- diff --git a/ext/opcache/ZendAccelerator.c b/ext/opcache/ZendAccelerator.c index 4d2fbb7130..3a1c538c80 100644 --- a/ext/opcache/ZendAccelerator.c +++ b/ext/opcache/ZendAccelerator.c @@ -4519,6 +4519,7 @@ static int accel_preload(const char *config, zend_bool in_child) php_call_shutdown_functions(); zend_call_destructors(); + php_output_end_all(); php_free_shutdown_functions(); /* Release stored values to avoid dangling pointers */