Browse Source

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.
PHP-5
Ilia Alshanetsky 23 years ago
parent
commit
dc052fe0e5
  1. 18
      Zend/zend_builtin_functions.c

18
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);

Loading…
Cancel
Save