summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFelipe Pena <felipe@php.net>2011-06-09 22:45:35 +0000
committerFelipe Pena <felipe@php.net>2011-06-09 22:45:35 +0000
commit7c46410876dca6efe1b58c2ffad16114e24b67a3 (patch)
treea8fbb5f2c072dcd3c8674cd19d71824b3ef523a7
parent024439c66ec13ec2f5829d9163db885758e1ba23 (diff)
downloadphp-git-7c46410876dca6efe1b58c2ffad16114e24b67a3.tar.gz
- Fixed bug #54347 (reflection_extension does not lowercase module function name)
patch by: laruence at yahoo dot com dot cn
-rw-r--r--ext/reflection/php_reflection.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/ext/reflection/php_reflection.c b/ext/reflection/php_reflection.c
index 1df797b664..57f8f48c30 100644
--- a/ext/reflection/php_reflection.c
+++ b/ext/reflection/php_reflection.c
@@ -1111,13 +1111,18 @@ static void _extension_string(string *str, zend_module_entry *module, char *inde
/* Is there a better way of doing this? */
while (func->fname) {
- if (zend_hash_find(EG(function_table), func->fname, strlen(func->fname) + 1, (void**) &fptr) == FAILURE) {
+ int fname_len = strlen(func->fname);
+ char *lc_name = zend_str_tolower_dup(func->fname, fname_len);
+
+ if (zend_hash_find(EG(function_table), lc_name, fname_len + 1, (void**) &fptr) == FAILURE) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Internal error: Cannot find extension function %s in global function table", func->fname);
func++;
+ efree(lc_name);
continue;
}
_function_string(str, fptr, NULL, " " TSRMLS_CC);
+ efree(lc_name);
func++;
}
string_printf(str, "%s }\n", indent);