dmitry Wed Apr 25 14:18:02 2007 UTC
Modified files: (Branch: PHP_5_2)
/php-src/main SAPI.c
Log:
ZTS fix
http://cvs.php.net/viewvc.cgi/php-src/main/SAPI.c?r1=1.202.2.7.2.12&r2=1.202.2.7.2.13&diff_format=u
Index: php-src/main/SAPI.c
diff -u php-src/main/SAPI.c:1.202.2.7.2.12 php-src/main/SAPI.c:1.202.2.7.2.13
--- php-src/main/SAPI.c:1.202.2.7.2.12 Wed Apr 25 11:05:16 2007
+++ php-src/main/SAPI.c Wed Apr 25 14:18:01 2007
@@ -18,7 +18,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: SAPI.c,v 1.202.2.7.2.12 2007/04/25 11:05:16 tony2001 Exp $ */
+/* $Id: SAPI.c,v 1.202.2.7.2.13 2007/04/25 14:18:01 dmitry Exp $ */
#include <ctype.h>
#include <sys/stat.h>
@@ -861,7 +861,7 @@
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 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 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_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_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;
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php