From 7c7c6b0d73a4c8047b6197d27729fef1de81afdd Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Wed, 4 Nov 2020 16:03:39 +0100 Subject: [PATCH] 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. --- ext/opcache/ZendAccelerator.c | 1 + 1 file changed, 1 insertion(+) 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 */ -- 2.50.1