helly Mon Jul 24 23:28:00 2006 UTC Modified files: /php-src/ext/standard var.c Log: - Correctly handle binary proeprty names which are not mangled http://cvs.php.net/viewvc.cgi/php-src/ext/standard/var.c?r1=1.240&r2=1.241&diff_format=u Index: php-src/ext/standard/var.c diff -u php-src/ext/standard/var.c:1.240 php-src/ext/standard/var.c:1.241 --- php-src/ext/standard/var.c:1.240 Mon Jul 24 17:55:41 2006 +++ php-src/ext/standard/var.c Mon Jul 24 23:28:00 2006 @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: var.c,v 1.240 2006/07/24 17:55:41 helly Exp $ */ +/* $Id: var.c,v 1.241 2006/07/24 23:28:00 helly Exp $ */ @@ -149,17 +149,24 @@ } else { /* string key */ int is_unicode = hash_key->type == IS_UNICODE; - zend_u_unmangle_property_name(hash_key->type, hash_key->arKey, hash_key->nKeyLength-1, &class_name, &prop_name); + int unmangle = zend_u_unmangle_property_name(hash_key->type, hash_key->arKey, hash_key->nKeyLength-1, &class_name, &prop_name); php_printf("%*c[", level + 1, ' '); - if (class_name.s) { + if (class_name.s && unmangle == SUCCESS) { if (class_name.s[0]=='*') { php_printf("%s\"%R\":protected", is_unicode ? "u" : "", hash_key->type, prop_name); } else { php_printf("%s\"%R\":%s\"%R\":private", is_unicode ? "u" : "", hash_key->type, prop_name, is_unicode ? "u" : "", hash_key->type, class_name); } } else { - php_printf("%s\"%R\"", is_unicode ? "u" : "", hash_key->type, prop_name); + if (is_unicode) { + php_printf("u"); + php_var_dump_unicode(hash_key->arKey.u, hash_key->nKeyLength-1, verbose, "\"", 0 TSRMLS_CC); + } else { + php_printf("\""); + PHPWRITE(hash_key->arKey.s, hash_key->nKeyLength - 1); + php_printf("\""); + } } ZEND_PUTS("]=>\n"); }
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php