- Missing fix for bug #54347

This commit is contained in:
Felipe Pena 2011-06-11 15:11:49 +00:00
parent c92904d160
commit 9b1ba00a1e
2 changed files with 11 additions and 2 deletions

4
NEWS
View File

@ -156,6 +156,10 @@ PHP NEWS
- Phar extension:
. Fixed bug #54395 (Phar::mount() crashes when calling with wrong parameters).
(Felipe)
- Reflection extension:
. Fixed bug #54347 (reflection_extension does not lowercase module function
name). (Felipe, laruence at yahoo dot com dot cn)
- SOAP extension:
. Fixed bug #54312 (soap_version logic bug). (tom at samplonius dot org)

View File

@ -4854,16 +4854,21 @@ ZEND_METHOD(reflection_extension, getFunctions)
/* 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;
}
ALLOC_ZVAL(function);
reflection_function_factory(fptr, NULL, function TSRMLS_CC);
add_assoc_zval_ex(return_value, func->fname, strlen(func->fname)+1, function);
add_assoc_zval_ex(return_value, func->fname, fname_len+1, function);
func++;
efree(lc_name);
}
}
}