summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitry Stogov <dmitry@php.net>2010-10-15 07:30:24 +0000
committerDmitry Stogov <dmitry@php.net>2010-10-15 07:30:24 +0000
commit3690ce39d9c775323ed73f41cb1a02fa56d19736 (patch)
treefb7eccc42683b0c0b5c398445531b66129b3a5dd
parentaaa2f1c30b3ba3da3e0030804054ee9c70e80bc7 (diff)
downloadphp-git-3690ce39d9c775323ed73f41cb1a02fa56d19736.tar.gz
zend_collect_module_handlers() has to be called after zend_extensions startup, because they can register additional 'hidden' extensions
-rw-r--r--Zend/zend_API.c3
-rw-r--r--Zend/zend_API.h1
-rw-r--r--main/main.c2
3 files changed, 4 insertions, 2 deletions
diff --git a/Zend/zend_API.c b/Zend/zend_API.c
index 7a021f7838..b89f8aaaa5 100644
--- a/Zend/zend_API.c
+++ b/Zend/zend_API.c
@@ -1688,7 +1688,7 @@ try_again:
}
/* }}} */
-static void zend_collect_module_handlers(TSRMLS_D) /* {{{ */
+ZEND_API void zend_collect_module_handlers(TSRMLS_D) /* {{{ */
{
HashPosition pos;
zend_module_entry *module;
@@ -1770,7 +1770,6 @@ ZEND_API int zend_startup_modules(TSRMLS_D) /* {{{ */
{
zend_hash_sort(&module_registry, zend_sort_modules, NULL, 0 TSRMLS_CC);
zend_hash_apply(&module_registry, (apply_func_t)zend_startup_module_ex TSRMLS_CC);
- zend_collect_module_handlers(TSRMLS_C);
return SUCCESS;
}
/* }}} */
diff --git a/Zend/zend_API.h b/Zend/zend_API.h
index 220e1ac43f..1c81e30bab 100644
--- a/Zend/zend_API.h
+++ b/Zend/zend_API.h
@@ -260,6 +260,7 @@ ZEND_API zend_module_entry* zend_register_internal_module(zend_module_entry *mod
ZEND_API zend_module_entry* zend_register_module_ex(zend_module_entry *module TSRMLS_DC);
ZEND_API int zend_startup_module_ex(zend_module_entry *module TSRMLS_DC);
ZEND_API int zend_startup_modules(TSRMLS_D);
+ZEND_API void zend_collect_module_handlers(TSRMLS_D);
ZEND_API void zend_destroy_modules(void);
ZEND_API void zend_check_magic_method_implementation(const zend_class_entry *ce, const zend_function *fptr, int error_type TSRMLS_DC);
diff --git a/main/main.c b/main/main.c
index 56bc3a3b2c..d3edcdc1c5 100644
--- a/main/main.c
+++ b/main/main.c
@@ -2059,6 +2059,8 @@ int php_module_startup(sapi_module_struct *sf, zend_module_entry *additional_mod
/* start Zend extensions */
zend_startup_extensions();
+ zend_collect_module_handlers(TSRMLS_C);
+
/* register additional functions */
if (sapi_module.additional_functions) {
if (zend_hash_find(&module_registry, "standard", sizeof("standard"), (void**)&module)==SUCCESS) {