]> granicus.if.org Git - php/commitdiff
- Fixed shutdown order before RC2.
authorDerick Rethans <derick@php.net>
Wed, 14 Sep 2005 20:08:31 +0000 (20:08 +0000)
committerDerick Rethans <derick@php.net>
Wed, 14 Sep 2005 20:08:31 +0000 (20:08 +0000)
main/main.c

index cb58163e24f1dcd33335852ad73d59063b73a3c8..5362e16b23e7ba1cd598cc343636e4e329cddf1c 100644 (file)
@@ -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);