johannes Sat Mar 17 23:38:41 2007 UTC Modified files: /php-src/ext/reflection php_reflection.c /php-src/ext/reflection/tests bug39884.phpt Log: - Fix string compare in unicode mode http://cvs.php.net/viewvc.cgi/php-src/ext/reflection/php_reflection.c?r1=1.273&r2=1.274&diff_format=u Index: php-src/ext/reflection/php_reflection.c diff -u php-src/ext/reflection/php_reflection.c:1.273 php-src/ext/reflection/php_reflection.c:1.274 --- php-src/ext/reflection/php_reflection.c:1.273 Sat Mar 17 22:59:22 2007 +++ php-src/ext/reflection/php_reflection.c Sat Mar 17 23:38:41 2007 @@ -20,7 +20,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_reflection.c,v 1.273 2007/03/17 22:59:22 tony2001 Exp $ */ +/* $Id: php_reflection.c,v 1.274 2007/03/17 23:38:41 johannes Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -2027,7 +2027,7 @@ * TODO: Think about moving these checks to the compiler or some sort of * lint-mode. */ - if (0 == strncmp(param->arg_info->class_name.v, "self", sizeof("self")- 1)) { + if (ZEND_U_EQUAL(ZEND_STR_TYPE, param->arg_info->class_name, param->arg_info->class_name_len, "self", sizeof("self")- 1)) { zend_class_entry *ce= param->fptr->common.scope; if (!ce) { zend_throw_exception_ex(reflection_exception_ptr, 0 TSRMLS_CC, @@ -2035,7 +2035,7 @@ return; } pce= &ce; - } else if (0 == strncmp(param->arg_info->class_name.v, "parent", sizeof("parent")- 1)) { + } else if (ZEND_U_EQUAL(ZEND_STR_TYPE, param->arg_info->class_name, param->arg_info->class_name_len, "parent", sizeof("parent")- 1)) { zend_class_entry *ce= param->fptr->common.scope; if (!ce) { zend_throw_exception_ex(reflection_exception_ptr, 0 TSRMLS_CC, @@ -4987,7 +4987,7 @@ php_info_print_table_start(); php_info_print_table_header(2, "Reflection", "enabled"); - php_info_print_table_row(2, "Version", "$Id: php_reflection.c,v 1.273 2007/03/17 22:59:22 tony2001 Exp $"); + php_info_print_table_row(2, "Version", "$Id: php_reflection.c,v 1.274 2007/03/17 23:38:41 johannes Exp $"); php_info_print_table_end(); } /* }}} */ http://cvs.php.net/viewvc.cgi/php-src/ext/reflection/tests/bug39884.phpt?r1=1.2&r2=1.3&diff_format=u Index: php-src/ext/reflection/tests/bug39884.phpt diff -u php-src/ext/reflection/tests/bug39884.phpt:1.2 php-src/ext/reflection/tests/bug39884.phpt:1.3 --- php-src/ext/reflection/tests/bug39884.phpt:1.2 Fri Dec 22 15:38:42 2006 +++ php-src/ext/reflection/tests/bug39884.phpt Sat Mar 17 23:38:41 2007 @@ -20,3 +20,9 @@ ["name"]=> string(13) "stubParamTest" } +--UEXPECT-- +object(ReflectionClass)#4 (1) { + [u"name"]=> + unicode(13) "stubParamTest" +} +
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php