All pastes #234196 Raw Edit

zend.c patch

public text v1 · immutable
#234196 ·published 2006-11-02 10:55 UTC
rendered paste body
--- zend.c.old	2006-10-16 14:31:02.000000000 +0100
+++ zend.c	2006-11-02 09:53:12.234375000 +0000
@@ -522,8 +522,9 @@
 
 static void zend_new_thread_end_handler(THREAD_T thread_id TSRMLS_DC)
 {
-	zend_copy_ini_directives(TSRMLS_C);
-	zend_ini_refresh_caches(ZEND_INI_STAGE_STARTUP TSRMLS_CC);
+	if (zend_copy_ini_directives(TSRMLS_C) == SUCCESS) {
+		zend_ini_refresh_caches(ZEND_INI_STAGE_STARTUP TSRMLS_CC);
+	}
 }
 #endif
 
@@ -700,7 +701,7 @@
 	free(EG(zend_constants));
 	executor_globals_ctor(executor_globals, tsrm_ls);
 	global_persistent_list = &EG(persistent_list);
-	zend_new_thread_end_handler(tsrm_thread_id() TSRMLS_CC);
+	zend_copy_ini_directives(TSRMLS_C);
 }
 #endif