diff options
| author | Ilia Alshanetsky <iliaa@php.net> | 2003-02-06 20:21:02 +0000 |
|---|---|---|
| committer | Ilia Alshanetsky <iliaa@php.net> | 2003-02-06 20:21:02 +0000 |
| commit | dc052fe0e5cf922b7cd526eac7572ed89361fe9e (patch) | |
| tree | 8a9645e33b88e3bb21b47a2f56ea756c49befb42 /Zend/zend_builtin_functions.c | |
| parent | fb44f1e0fb50df5b347fcde79f8939a1aeff90fd (diff) | |
| download | php-git-dc052fe0e5cf922b7cd526eac7572ed89361fe9e.tar.gz | |
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.
Diffstat (limited to 'Zend/zend_builtin_functions.c')
| -rw-r--r-- | Zend/zend_builtin_functions.c | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/Zend/zend_builtin_functions.c b/Zend/zend_builtin_functions.c index 6734250463..f9b2253470 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); |
