]> granicus.if.org Git - php/commitdiff
Fixed bug #61922 (ZTS build doesn't accept zend.script_encoding config)
authorXinchen Hui <laruence@php.net>
Thu, 3 May 2012 14:39:53 +0000 (22:39 +0800)
committerXinchen Hui <laruence@php.net>
Thu, 3 May 2012 14:39:53 +0000 (22:39 +0800)
NEWS
Zend/zend.c

diff --git a/NEWS b/NEWS
index 8796cf4a19106fc7cb4f35e5baf8753a7be1dd58..9ef6abf66f0e33598f93e3de27767fcd94ca4bdb 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -10,6 +10,8 @@ PHP                                                                        NEWS
     (Laruence)
 
 - Core:
+  . Fixed bug #61922 (ZTS build doesn't accept zend.script_encoding config).
+    (Laruence)
   . Fixed missing bound check in iptcparse(). (chris at chiappa.net)
   . Fixed bug #61827 (incorrect \e processing on Windows) (Anatoliy)
   . Fixed bug #61761 ('Overriding' a private static method with a different 
index dd299f1d87557b3ff24ec496c76ee44b07acbe4d..37a1a27c7d67b821adf48a94a1ddf20e80eb76d0 100644 (file)
@@ -781,6 +781,8 @@ void zend_register_standard_ini_entries(TSRMLS_D) /* {{{ */
 void zend_post_startup(TSRMLS_D) /* {{{ */
 {
 #ifdef ZTS
+       zend_encoding **script_encoding_list;
+
        zend_compiler_globals *compiler_globals = ts_resource(compiler_globals_id);
        zend_executor_globals *executor_globals = ts_resource(executor_globals_id);
 
@@ -795,7 +797,12 @@ void zend_post_startup(TSRMLS_D) /* {{{ */
        zend_destroy_rsrc_list(&EG(persistent_list) TSRMLS_CC);
        free(compiler_globals->function_table);
        free(compiler_globals->class_table);
-       compiler_globals_ctor(compiler_globals, tsrm_ls);
+       if ((script_encoding_list = (zend_encoding **)compiler_globals->script_encoding_list)) {
+               compiler_globals_ctor(compiler_globals, tsrm_ls);
+               compiler_globals->script_encoding_list = (const zend_encoding **)script_encoding_list;
+       } else {
+               compiler_globals_ctor(compiler_globals, tsrm_ls);
+       }
        free(EG(zend_constants));
        executor_globals_ctor(executor_globals, tsrm_ls);
        global_persistent_list = &EG(persistent_list);