php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Return to Bug #54347
Patch lowcase-func-name-in-reflection-extension revision 2011-03-22 12:37 UTC by laruence at yahoo dot com dot cn

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);
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 21 17:01:58 2024 UTC