diff options
author | Dmitry Stogov <dmitry@php.net> | 2007-04-25 14:18:01 +0000 |
---|---|---|
committer | Dmitry Stogov <dmitry@php.net> | 2007-04-25 14:18:01 +0000 |
commit | 4bd17132b1d123d00d8a0db2c0b57c28710a50d2 (patch) | |
tree | 700ad1f0a28bfa92c4df9eb8e31e1d9654fe3dbf /main | |
parent | 41896020eaeb83fa294bdcc5e30b6783e267154d (diff) | |
download | php-git-4bd17132b1d123d00d8a0db2c0b57c28710a50d2.tar.gz |
ZTS fix
Diffstat (limited to 'main')
-rw-r--r-- | main/SAPI.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/main/SAPI.c b/main/SAPI.c index 968b96bd6a..0e955e4a7a 100644 --- a/main/SAPI.c +++ b/main/SAPI.c @@ -861,7 +861,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; } return zend_hash_add(&SG(known_post_content_types), @@ -871,7 +871,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, @@ -882,7 +882,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; @@ -893,7 +893,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; @@ -903,7 +903,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; |