php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Return to Bug #61728
Patch bug61728.patch revision 2012-04-14 16:58 UTC by laruence@php.net
Patch bug61728.phpt revision 2012-04-14 16:57 UTC by laruence@php.net

Patch bug61728.patch for Reproducible crash Bug #61728

Patch version 2012-04-14 16:58 UTC

Return to Bug #61728 | Download this patch
Patch Revisions:

Developer: laruence@php.net

--- a/main/main.c
+++ b/main/main.c
@@ -1740,22 +1740,22 @@ void php_request_shutdown(void *dummy)
 		}
 	} zend_end_try();
 
-	/* 4. Shutdown output layer (send the set HTTP headers, cleanup output handlers, etc.) */
-	zend_try {
-		php_output_deactivate(TSRMLS_C);
-	} zend_end_try();
-
-	/* 5. Reset max_execution_time (no longer executing php code after response sent) */
+	/* 4. Reset max_execution_time (no longer executing php code after response sent) */
 	zend_try {
 		zend_unset_timeout(TSRMLS_C);
 	} zend_end_try();
 
-	/* 6. Call all extensions RSHUTDOWN functions */
+	/* 5. Call all extensions RSHUTDOWN functions */
 	if (PG(modules_activated)) {
 		zend_deactivate_modules(TSRMLS_C);
 		php_free_shutdown_functions(TSRMLS_C);
 	}
 
+	/* 6. Shutdown output layer (send the set HTTP headers, cleanup output handlers, etc.) */
+	zend_try {
+		php_output_deactivate(TSRMLS_C);
+	} zend_end_try();
+
 	/* 7. Destroy super-globals */
 	zend_try {
 		int i;
 
PHP Copyright © 2001-2014 The PHP Group
All rights reserved.
Last updated: Thu Apr 24 21:01:55 2014 UTC