]> granicus.if.org Git - php/commitdiff
Fixed bug #19506 (get_extension_funcs() can now retrieve a list of built-in
authorIlia Alshanetsky <iliaa@php.net>
Thu, 6 Feb 2003 20:21:02 +0000 (20:21 +0000)
committerIlia Alshanetsky <iliaa@php.net>
Thu, 6 Feb 2003 20:21:02 +0000 (20:21 +0000)
Zend Engine functions, if "zend" is specified as the module name).
Made get_extension_funcs() on failure.

Zend/zend_builtin_functions.c

index 67342504634fe9532982d2e37b699ba27c625d57..f9b2253470f8e6dd2a95cfe7c9e84c80e95a5b99 100644 (file)
@@ -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);