]> granicus.if.org Git - php/commitdiff
End output handlers in preload shutdown
authorNikita Popov <nikita.ppv@gmail.com>
Wed, 4 Nov 2020 15:03:39 +0000 (16:03 +0100)
committerNikita Popov <nikita.ppv@gmail.com>
Wed, 4 Nov 2020 15:05:24 +0000 (16:05 +0100)
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

index 4d2fbb71303d6cfe4d673d6857a58b6927da5b08..3a1c538c80fde8e3a9f21714dbee7295d6602bfb 100644 (file)
@@ -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 */