]> granicus.if.org Git - php/commitdiff
Fix for Unicode access.
authorAndrei Zmievski <andrei@php.net>
Tue, 13 Sep 2005 21:04:07 +0000 (21:04 +0000)
committerAndrei Zmievski <andrei@php.net>
Tue, 13 Sep 2005 21:04:07 +0000 (21:04 +0000)
Zend/zend_reflection_api.c
ext/reflection/php_reflection.c

index 970dceff73e5e646ce0f7bc6434836582693193a..1685997e49ec2b2e6492cbbf47d49acaa98305b2 100644 (file)
@@ -1673,11 +1673,11 @@ ZEND_METHOD(reflection_parameter, __construct)
                        char *lcname;
 
                                convert_to_text_ex(&reference);
-                               lcname = zend_u_str_case_fold(Z_TYPE_P(reference), Z_STRVAL_P(reference), Z_STRLEN_P(reference), 1, &lcname_len);
+                               lcname = zend_u_str_case_fold(Z_TYPE_P(reference), Z_UNIVAL_P(reference), Z_UNILEN_P(reference), 1, &lcname_len);
                                if (zend_u_hash_find(EG(function_table), Z_TYPE_P(reference), lcname, lcname_len + 1, (void**) &fptr) == FAILURE) {
                                        efree(lcname);
                                        zend_throw_exception_ex(U_CLASS_ENTRY(reflection_exception_ptr), 0 TSRMLS_CC, 
-                                               "Function %R() does not exist", Z_TYPE_P(reference), Z_STRVAL_P(reference));
+                                               "Function %R() does not exist", Z_TYPE_P(reference), Z_UNIVAL_P(reference));
                                        return;
                                }
                                efree(lcname);
index 970dceff73e5e646ce0f7bc6434836582693193a..1685997e49ec2b2e6492cbbf47d49acaa98305b2 100644 (file)
@@ -1673,11 +1673,11 @@ ZEND_METHOD(reflection_parameter, __construct)
                        char *lcname;
 
                                convert_to_text_ex(&reference);
-                               lcname = zend_u_str_case_fold(Z_TYPE_P(reference), Z_STRVAL_P(reference), Z_STRLEN_P(reference), 1, &lcname_len);
+                               lcname = zend_u_str_case_fold(Z_TYPE_P(reference), Z_UNIVAL_P(reference), Z_UNILEN_P(reference), 1, &lcname_len);
                                if (zend_u_hash_find(EG(function_table), Z_TYPE_P(reference), lcname, lcname_len + 1, (void**) &fptr) == FAILURE) {
                                        efree(lcname);
                                        zend_throw_exception_ex(U_CLASS_ENTRY(reflection_exception_ptr), 0 TSRMLS_CC, 
-                                               "Function %R() does not exist", Z_TYPE_P(reference), Z_STRVAL_P(reference));
+                                               "Function %R() does not exist", Z_TYPE_P(reference), Z_UNIVAL_P(reference));
                                        return;
                                }
                                efree(lcname);