summaryrefslogtreecommitdiff
path: root/Zend
diff options
context:
space:
mode:
authorDmitry Stogov <dmitry@php.net>2006-11-08 11:04:27 +0000
committerDmitry Stogov <dmitry@php.net>2006-11-08 11:04:27 +0000
commita84a2eae6a2d8f47728bad933381fc82cd354f3d (patch)
tree78e4ee4ddf7c77417695949d11b003470f590189 /Zend
parent84b9dcb73f11ea4fd29a9cecc31accf3757b61a6 (diff)
downloadphp-git-a84a2eae6a2d8f47728bad933381fc82cd354f3d.tar.gz
Fixed bug #39344 (Unnecessary calls to OnModify callback routine for an extension INI directive). (wharmby at uk dot ibm dot com, Dmitry)
Diffstat (limited to 'Zend')
-rw-r--r--Zend/zend.c7
-rw-r--r--Zend/zend_ini.c3
2 files changed, 6 insertions, 4 deletions
diff --git a/Zend/zend.c b/Zend/zend.c
index 9b1f6e3fb4..ee8b4b767f 100644
--- a/Zend/zend.c
+++ b/Zend/zend.c
@@ -522,8 +522,9 @@ static void executor_globals_dtor(zend_executor_globals *executor_globals TSRMLS
static void zend_new_thread_end_handler(THREAD_T thread_id TSRMLS_DC)
{
- zend_copy_ini_directives(TSRMLS_C);
- zend_ini_refresh_caches(ZEND_INI_STAGE_STARTUP TSRMLS_CC);
+ if (zend_copy_ini_directives(TSRMLS_C) == SUCCESS) {
+ zend_ini_refresh_caches(ZEND_INI_STAGE_STARTUP TSRMLS_CC);
+ }
}
#endif
@@ -700,7 +701,7 @@ void zend_post_startup(TSRMLS_D)
free(EG(zend_constants));
executor_globals_ctor(executor_globals, tsrm_ls);
global_persistent_list = &EG(persistent_list);
- zend_new_thread_end_handler(tsrm_thread_id() TSRMLS_CC);
+ zend_copy_ini_directives(TSRMLS_C);
}
#endif
diff --git a/Zend/zend_ini.c b/Zend/zend_ini.c
index 1cade26d6a..c4951acee9 100644
--- a/Zend/zend_ini.c
+++ b/Zend/zend_ini.c
@@ -126,7 +126,6 @@ ZEND_API int zend_copy_ini_directives(TSRMLS_D)
return FAILURE;
}
zend_hash_copy(EG(ini_directives), registered_zend_ini_directives, NULL, &ini_entry, sizeof(zend_ini_entry));
- zend_ini_refresh_caches(ZEND_INI_STAGE_STARTUP TSRMLS_CC);
return SUCCESS;
}
#endif
@@ -214,6 +213,7 @@ ZEND_API void zend_unregister_ini_entries(int module_number TSRMLS_DC)
}
+#ifdef ZTS
static int zend_ini_refresh_cache(zend_ini_entry *p, int stage TSRMLS_DC)
{
if (p->on_modify) {
@@ -227,6 +227,7 @@ ZEND_API void zend_ini_refresh_caches(int stage TSRMLS_DC)
{
zend_hash_apply_with_argument(EG(ini_directives), (apply_func_arg_t) zend_ini_refresh_cache, (void *)(long) stage TSRMLS_CC);
}
+#endif
ZEND_API int zend_alter_ini_entry(char *name, uint name_length, char *new_value, uint new_value_length, int modify_type, int stage)