From: Dmitry Stogov Date: Wed, 25 Apr 2007 14:18:15 +0000 (+0000) Subject: ZTS fix X-Git-Tag: RELEASE_1_2_0~220 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=00e9c1b1bf4bec834dcdc8793a77cdd02fbc59d0;p=php ZTS fix --- diff --git a/main/SAPI.c b/main/SAPI.c index d22142d9a2..08f9e68963 100644 --- a/main/SAPI.c +++ b/main/SAPI.c @@ -794,7 +794,7 @@ SAPI_API int sapi_register_post_entries(sapi_post_entry *post_entries TSRMLS_DC) SAPI_API int sapi_register_post_entry(sapi_post_entry *post_entry TSRMLS_DC) { - if (EG(in_execution)) { + if (SG(sapi_started) && EG(in_execution)) { return FAILURE; } @@ -805,7 +805,7 @@ SAPI_API int sapi_register_post_entry(sapi_post_entry *post_entry TSRMLS_DC) SAPI_API void sapi_unregister_post_entry(sapi_post_entry *post_entry TSRMLS_DC) { - if (EG(in_execution)) { + if (SG(sapi_started) && EG(in_execution)) { return; } zend_hash_del(&SG(known_post_content_types), post_entry->content_type, @@ -816,7 +816,7 @@ SAPI_API void sapi_unregister_post_entry(sapi_post_entry *post_entry TSRMLS_DC) SAPI_API int sapi_register_default_post_reader(void (*default_post_reader)(TSRMLS_D)) { TSRMLS_FETCH(); - if (EG(in_execution)) { + if (SG(sapi_started) && EG(in_execution)) { return FAILURE; } sapi_module.default_post_reader = default_post_reader; @@ -827,7 +827,7 @@ SAPI_API int sapi_register_default_post_reader(void (*default_post_reader)(TSRML SAPI_API int sapi_register_treat_data(void (*treat_data)(int arg, char *str, zval *destArray TSRMLS_DC)) { TSRMLS_FETCH(); - if (EG(in_execution)) { + if (SG(sapi_started) && EG(in_execution)) { return FAILURE; } sapi_module.treat_data = treat_data; @@ -837,7 +837,7 @@ SAPI_API int sapi_register_treat_data(void (*treat_data)(int arg, char *str, zva SAPI_API int sapi_register_input_filter(unsigned int (*input_filter)(int arg, char *var, char **val, unsigned int val_len, unsigned int *new_val_len TSRMLS_DC)) { TSRMLS_FETCH(); - if (EG(in_execution)) { + if (SG(sapi_started) && EG(in_execution)) { return FAILURE; } sapi_module.input_filter = input_filter;