Patch lowcase-func-name-in-reflection-extension for Reflection related Bug #54347
Patch version 2011-03-22 12:37 UTC
Return to Bug #54347 |
Download this patch
Patch Revisions:
Developer: laruence@yahoo.com.cn
diff -r php-5.3.3-old/ext/reflection/php_reflection.c php-5.3.3/ext/reflection/php_reflection.c
1075a1076,1077
> int lowercase_fname_len = 0;
> char *lowercase_fname = NULL;
1081c1083,1085
< if (zend_hash_find(EG(function_table), func->fname, strlen(func->fname) + 1, (void**) &fptr) == FAILURE) {
---
> lowercase_fname_len = strlen(func->fname);
> lowercase_fname = zend_str_tolower_dup(func->fname, lowercase_fname_len)
> if (zend_hash_find(EG(function_table), lowercase_fname, lowercase_fname_len + 1, (void**) &fptr) == FAILURE) {
1085a1090
> efree(lowercase_fname);
|