diff options
author | Marcus Boerger <helly@php.net> | 2003-12-22 20:03:01 +0000 |
---|---|---|
committer | Marcus Boerger <helly@php.net> | 2003-12-22 20:03:01 +0000 |
commit | b58d3719277139258f6c6b171783ee6975ce57d6 (patch) | |
tree | 3a36d7f1be29a7e7050d41e7398539941c1455b4 /ext/reflection/php_reflection.c | |
parent | e6f386df9fb1447a4801d9c55bf7282294394736 (diff) | |
download | php-git-b58d3719277139258f6c6b171783ee6975ce57d6.tar.gz |
Fixed bug #26695 (Reflection API does not recognize mixed-case class hints)
# The exception part
Diffstat (limited to 'ext/reflection/php_reflection.c')
-rw-r--r-- | ext/reflection/php_reflection.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/ext/reflection/php_reflection.c b/ext/reflection/php_reflection.c index f2559609ed..a62b49bd00 100644 --- a/ext/reflection/php_reflection.c +++ b/ext/reflection/php_reflection.c @@ -1416,12 +1416,15 @@ ZEND_METHOD(reflection_parameter, getClass) RETURN_NULL(); } else { zend_class_entry **pce; - - if (zend_hash_find(EG(class_table), param->arg_info->class_name, param->arg_info->class_name_len + 1, (void **) &pce) == FAILURE) { + char *lcname = do_alloca(param->arg_info->class_name_len + 1); + zend_str_tolower_copy(lcname, param->arg_info->class_name, param->arg_info->class_name_len); + if (zend_hash_find(EG(class_table), lcname, param->arg_info->class_name_len + 1, (void **) &pce) == FAILURE) { + free_alloca(lcname); zend_throw_exception_ex(reflection_exception_ptr, 0 TSRMLS_CC, "Class %s does not exist", param->arg_info->class_name); return; } + free_alloca(lcname); reflection_class_factory(*pce, return_value TSRMLS_CC); } } |