Skip to content

Commit 5e33c04

Browse files
author
Moriyoshi Koizumi
committed
- Fixed bug #32109 ($_POST is not populated in multithreaded environment).
1 parent fc825e2 commit 5e33c04

File tree

4 files changed

+14
-1
lines changed

4 files changed

+14
-1
lines changed

NEWS

+2
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,8 @@ PHP NEWS
6767
- Fixed bug with raw_post_data not getting set. (Brian)
6868
- Fixed bug in mysql::client_version(). (Georg)
6969
- Fixed ZTS destruction. (Marcus)
70+
- Fixed bug #32109 ($_POST is not populated in multithreaded environment).
71+
(Moriyoshi)
7072
- Fixed bug #31478 (segfault with empty() / isset()). (Moriyoshi)
7173
- Fixed bug #31033 (php:function(string, nodeset) with xsl:key crashes PHP).
7274
(Rob)

main/SAPI.c

+1
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ static void sapi_globals_ctor(sapi_globals_struct *sapi_globals TSRMLS_DC)
6161
{
6262
memset(sapi_globals, 0, sizeof(*sapi_globals));
6363
zend_hash_init_ex(&sapi_globals->known_post_content_types, 5, NULL, NULL, 1, 0);
64+
php_setup_sapi_content_types(TSRMLS_C);
6465
}
6566

6667
static void sapi_globals_dtor(sapi_globals_struct *sapi_globals TSRMLS_DC)

main/php_content_types.c

+10-1
Original file line numberDiff line numberDiff line change
@@ -74,14 +74,23 @@ SAPI_API SAPI_POST_READER_FUNC(php_default_post_reader)
7474
*/
7575
int php_startup_sapi_content_types(TSRMLS_D)
7676
{
77-
sapi_register_post_entries(php_post_entries TSRMLS_CC);
7877
sapi_register_default_post_reader(php_default_post_reader);
7978
sapi_register_treat_data(php_default_treat_data);
8079
sapi_register_input_filter(php_default_input_filter);
8180
return SUCCESS;
8281
}
8382
/* }}} */
8483

84+
/* {{{ php_setup_sapi_content_types
85+
*/
86+
int php_setup_sapi_content_types(TSRMLS_D)
87+
{
88+
sapi_register_post_entries(php_post_entries TSRMLS_CC);
89+
90+
return SUCCESS;
91+
}
92+
/* }}} */
93+
8594
/*
8695
* Local variables:
8796
* tab-width: 4

main/php_content_types.h

+1
Original file line numberDiff line numberDiff line change
@@ -26,5 +26,6 @@
2626
SAPI_API SAPI_POST_READER_FUNC(php_default_post_reader);
2727
SAPI_API SAPI_POST_HANDLER_FUNC(php_std_post_handler);
2828
int php_startup_sapi_content_types(TSRMLS_D);
29+
int php_setup_sapi_content_types(TSRMLS_D);
2930

3031
#endif /* PHP_CONTENT_TYPES_H */

0 commit comments

Comments
 (0)