diff options
author | Marcus Boerger <helly@php.net> | 2004-09-23 18:37:53 +0000 |
---|---|---|
committer | Marcus Boerger <helly@php.net> | 2004-09-23 18:37:53 +0000 |
commit | e13eb1d6c057dd1075d224399ec4a4e817844227 (patch) | |
tree | 96d2e967d01d12a8887e45df4f91be902afc8e84 /ext/reflection/php_reflection.c | |
parent | 97b796d0aa5c5d21620e73c6adc9b060b2e350d9 (diff) | |
download | php-git-e13eb1d6c057dd1075d224399ec4a4e817844227.tar.gz |
Bugfix # 30209
Diffstat (limited to 'ext/reflection/php_reflection.c')
-rw-r--r-- | ext/reflection/php_reflection.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/ext/reflection/php_reflection.c b/ext/reflection/php_reflection.c index 2576e09ad1..8854adf204 100644 --- a/ext/reflection/php_reflection.c +++ b/ext/reflection/php_reflection.c @@ -2315,7 +2315,7 @@ ZEND_METHOD(reflection_class, getMethod) reflection_object *intern; zend_class_entry *ce; zend_function *mptr; - char *name; + char *name, *lc_name; int name_len; METHOD_NOTSTATIC; @@ -2324,10 +2324,12 @@ ZEND_METHOD(reflection_class, getMethod) } GET_REFLECTION_OBJECT_PTR(ce); - zend_str_tolower(name, name_len); - if (zend_hash_find(&ce->function_table, name, name_len + 1, (void**) &mptr) == SUCCESS) { + lc_name = zend_str_tolower_dup(name, name_len); + if (zend_hash_find(&ce->function_table, lc_name, name_len + 1, (void**) &mptr) == SUCCESS) { reflection_method_factory(ce, mptr, return_value TSRMLS_CC); + efree(lc_name); } else { + efree(lc_name); zend_throw_exception_ex(reflection_exception_ptr, 0 TSRMLS_CC, "Method %s does not exist", name); return; |