From: Moriyoshi Koizumi Date: Sat, 5 Mar 2005 16:41:13 +0000 (+0000) Subject: - Fixed bug #32109 ($_POST is not populated in multithreaded environment). X-Git-Tag: RELEASE_0_3~73 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=5e33c04e953dfa43f33f977c8d020686b5bd4f0e;p=php - Fixed bug #32109 ($_POST is not populated in multithreaded environment). --- diff --git a/NEWS b/NEWS index 354cb10a33..a034411dc6 100644 --- a/NEWS +++ b/NEWS @@ -67,6 +67,8 @@ PHP NEWS - Fixed bug with raw_post_data not getting set. (Brian) - Fixed bug in mysql::client_version(). (Georg) - Fixed ZTS destruction. (Marcus) +- Fixed bug #32109 ($_POST is not populated in multithreaded environment). + (Moriyoshi) - Fixed bug #31478 (segfault with empty() / isset()). (Moriyoshi) - Fixed bug #31033 (php:function(string, nodeset) with xsl:key crashes PHP). (Rob) diff --git a/main/SAPI.c b/main/SAPI.c index 217532f9d3..7e5ed94128 100644 --- a/main/SAPI.c +++ b/main/SAPI.c @@ -61,6 +61,7 @@ static void sapi_globals_ctor(sapi_globals_struct *sapi_globals TSRMLS_DC) { memset(sapi_globals, 0, sizeof(*sapi_globals)); zend_hash_init_ex(&sapi_globals->known_post_content_types, 5, NULL, NULL, 1, 0); + php_setup_sapi_content_types(TSRMLS_C); } static void sapi_globals_dtor(sapi_globals_struct *sapi_globals TSRMLS_DC) diff --git a/main/php_content_types.c b/main/php_content_types.c index bf9ad54645..b4471cf431 100644 --- a/main/php_content_types.c +++ b/main/php_content_types.c @@ -74,7 +74,6 @@ SAPI_API SAPI_POST_READER_FUNC(php_default_post_reader) */ int php_startup_sapi_content_types(TSRMLS_D) { - sapi_register_post_entries(php_post_entries TSRMLS_CC); sapi_register_default_post_reader(php_default_post_reader); sapi_register_treat_data(php_default_treat_data); sapi_register_input_filter(php_default_input_filter); @@ -82,6 +81,16 @@ int php_startup_sapi_content_types(TSRMLS_D) } /* }}} */ +/* {{{ php_setup_sapi_content_types + */ +int php_setup_sapi_content_types(TSRMLS_D) +{ + sapi_register_post_entries(php_post_entries TSRMLS_CC); + + return SUCCESS; +} +/* }}} */ + /* * Local variables: * tab-width: 4 diff --git a/main/php_content_types.h b/main/php_content_types.h index e04f6dc45d..cd503f944e 100644 --- a/main/php_content_types.h +++ b/main/php_content_types.h @@ -26,5 +26,6 @@ SAPI_API SAPI_POST_READER_FUNC(php_default_post_reader); SAPI_API SAPI_POST_HANDLER_FUNC(php_std_post_handler); int php_startup_sapi_content_types(TSRMLS_D); +int php_setup_sapi_content_types(TSRMLS_D); #endif /* PHP_CONTENT_TYPES_H */