From dc052fe0e5cf922b7cd526eac7572ed89361fe9e Mon Sep 17 00:00:00 2001 From: Ilia Alshanetsky Date: Thu, 6 Feb 2003 20:21:02 +0000 Subject: [PATCH] Fixed bug #19506 (get_extension_funcs() can now retrieve a list of built-in Zend Engine functions, if "zend" is specified as the module name). Made get_extension_funcs() on failure. --- Zend/zend_builtin_functions.c | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/Zend/zend_builtin_functions.c b/Zend/zend_builtin_functions.c index 67342504634..f9b2253470f 100644 --- a/Zend/zend_builtin_functions.c +++ b/Zend/zend_builtin_functions.c @@ -1614,16 +1614,20 @@ ZEND_FUNCTION(get_extension_funcs) } convert_to_string_ex(extension_name); - if (zend_hash_find(&module_registry, Z_STRVAL_PP(extension_name), - Z_STRLEN_PP(extension_name)+1, (void**)&module) == FAILURE) { - return; + if (strncasecmp(Z_STRVAL_PP(extension_name), "zend", sizeof("zend"))) { + if (zend_hash_find(&module_registry, Z_STRVAL_PP(extension_name), + Z_STRLEN_PP(extension_name)+1, (void**)&module) == FAILURE) { + RETURN_FALSE; + } + + if (!(func = module->functions)) { + RETURN_FALSE; + } + } else { + func = builtin_functions; } array_init(return_value); - func = module->functions; - if (!func) { - return; - } while (func->fname) { add_next_index_string(return_value, func->fname, 1);