]> granicus.if.org Git - php/commitdiff
- Makes "parent" and "self" checking case-insensitive
authorFelipe Pena <felipe@php.net>
Thu, 29 Jul 2010 01:59:40 +0000 (01:59 +0000)
committerFelipe Pena <felipe@php.net>
Thu, 29 Jul 2010 01:59:40 +0000 (01:59 +0000)
ext/reflection/php_reflection.c

index e922bde093c06981dc6ce1005fc3c5b9621ad83d..77070e53d22d7e6bcde347301fb7e9c1adc00543 100644 (file)
@@ -2324,7 +2324,7 @@ ZEND_METHOD(reflection_parameter, getClass)
                 * TODO: Think about moving these checks to the compiler or some sort of
                 * lint-mode.
                 */
-               if (0 == strncmp(param->arg_info->class_name, "self", sizeof("self")- 1)) {
+               if (0 == zend_binary_strcasecmp(param->arg_info->class_name, param->arg_info->class_name_len, "self", sizeof("self")- 1)) {
                        ce = param->fptr->common.scope;
                        if (!ce) {
                                zend_throw_exception_ex(reflection_exception_ptr, 0 TSRMLS_CC, 
@@ -2332,7 +2332,7 @@ ZEND_METHOD(reflection_parameter, getClass)
                                return;
                        }
                        pce= &ce;
-               } else if (0 == strncmp(param->arg_info->class_name, "parent", sizeof("parent")- 1)) {
+               } else if (0 == zend_binary_strcasecmp(param->arg_info->class_name, param->arg_info->class_name_len, "parent", sizeof("parent")- 1)) {
                        ce = param->fptr->common.scope;
                        if (!ce) {
                                zend_throw_exception_ex(reflection_exception_ptr, 0 TSRMLS_CC,