From a5f0cbed448d9a057c8cf451074b870e27a335fd Mon Sep 17 00:00:00 2001 From: Derick Rethans Date: Wed, 14 Sep 2005 20:08:31 +0000 Subject: [PATCH] - Fixed shutdown order before RC2. --- main/main.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/main/main.c b/main/main.c index cb58163e24..5362e16b23 100644 --- a/main/main.c +++ b/main/main.c @@ -1200,16 +1200,16 @@ void php_request_shutdown(void *dummy) EG(opline_ptr) = NULL; EG(active_op_array) = NULL; - /* 1. Call all possible __destruct() functions */ - zend_try { - zend_call_destructors(TSRMLS_C); - } zend_end_try(); - - /* 2. Call all possible shutdown functions registered with register_shutdown_function() */ + /* 1. Call all possible shutdown functions registered with register_shutdown_function() */ if (PG(modules_activated)) zend_try { php_call_shutdown_functions(TSRMLS_C); } zend_end_try(); + /* 2. Call all possible __destruct() functions */ + zend_try { + zend_call_destructors(TSRMLS_C); + } zend_end_try(); + /* 3. Flush all output buffers */ zend_try { php_end_ob_buffers((zend_bool)(SG(request_info).headers_only?0:1) TSRMLS_CC); -- 2.50.1