summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXinchen Hui <laruence@php.net>2012-05-03 22:39:53 +0800
committerXinchen Hui <laruence@php.net>2012-05-03 22:39:53 +0800
commit72f19e9a8bcf5712b24fa333a26616eff19ac1ce (patch)
tree3d1bdd5674431cd62c583bda232b73274e7d85d9
parentd74d88fbb9c29b1dd5ff05a54b72cf7c9250955c (diff)
downloadphp-git-72f19e9a8bcf5712b24fa333a26616eff19ac1ce.tar.gz
Fixed bug #61922 (ZTS build doesn't accept zend.script_encoding config)
-rw-r--r--NEWS2
-rw-r--r--Zend/zend.c9
2 files changed, 10 insertions, 1 deletions
diff --git a/NEWS b/NEWS
index 8796cf4a19..9ef6abf66f 100644
--- 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
diff --git a/Zend/zend.c b/Zend/zend.c
index dd299f1d87..37a1a27c7d 100644
--- a/Zend/zend.c
+++ b/Zend/zend.c
@@ -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);