summaryrefslogtreecommitdiff
path: root/main
diff options
context:
space:
mode:
authorMoriyoshi Koizumi <moriyoshi@php.net>2005-03-05 16:41:13 (GMT)
committerMoriyoshi Koizumi <moriyoshi@php.net>2005-03-05 16:41:13 (GMT)
commit5e33c04e953dfa43f33f977c8d020686b5bd4f0e (patch)
tree62286e007b25aac7d03effc2ce550b247ef4bd34 /main
parentfc825e2071a4762653f19fbff16983c49689f604 (diff)
downloadphp-5e33c04e953dfa43f33f977c8d020686b5bd4f0e.tar.gz
- Fixed bug #32109 ($_POST is not populated in multithreaded environment).
Diffstat (limited to 'main')
-rw-r--r--main/SAPI.c1
-rw-r--r--main/php_content_types.c11
-rw-r--r--main/php_content_types.h1
3 files changed, 12 insertions, 1 deletions
diff --git a/main/SAPI.c b/main/SAPI.c
index 217532f..7e5ed94 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 bf9ad54..b4471cf 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 e04f6dc..cd503f9 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 */