summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--NEWS2
-rw-r--r--main/SAPI.c1
-rw-r--r--main/php_content_types.c11
-rw-r--r--main/php_content_types.h1
4 files changed, 14 insertions, 1 deletions
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 */