derick Fri Dec 17 09:39:35 2004 EDT
Added files: (Branch: PHP_5_0)
/php-src/ext/standard/tests/array var_export2.phpt
Modified files:
/php-src NEWS
/php-src/ext/standard var.c
Log:
- MF43: Fixed bug #31072 (var_export() does not output an array element with
an
empty string key). (Derick)
http://cvs.php.net/diff.php/php-src/NEWS?r1=1.1760.2.166&r2=1.1760.2.167&ty=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.1760.2.166 php-src/NEWS:1.1760.2.167
--- php-src/NEWS:1.1760.2.166 Fri Dec 17 07:22:09 2004
+++ php-src/NEWS Fri Dec 17 09:39:34 2004
@@ -6,6 +6,8 @@
- Fixed bug #31110 (PHP 4.3.10 does not compile on Tru64 UNIX 5.1B). (Derick)
- Fixed bug #31107 (Compile failure on Solaris 9 (Intel) and gcc 3.4.3).
(Derick)
- Fixed bug #31087 (broken php_url_encode_hash macro). (Ilia)
+- Fixed bug #31072 (var_export() does not output an array element with an empty
+ string key). (Derick)
- Fixed bug #31056 (php_std_date() returns invalid formatted date if
y2k_compliance is On). (Ilia)
http://cvs.php.net/diff.php/php-src/ext/standard/var.c?r1=1.191.2.4&r2=1.191.2.5&ty=u
Index: php-src/ext/standard/var.c
diff -u php-src/ext/standard/var.c:1.191.2.4
php-src/ext/standard/var.c:1.191.2.5
--- php-src/ext/standard/var.c:1.191.2.4 Fri Oct 8 15:03:53 2004
+++ php-src/ext/standard/var.c Fri Dec 17 09:39:35 2004
@@ -18,7 +18,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: var.c,v 1.191.2.4 2004/10/08 19:03:53 helly Exp $ */
+/* $Id: var.c,v 1.191.2.5 2004/12/17 14:39:35 derick Exp $ */
/* {{{ includes
@@ -319,20 +319,13 @@
if (hash_key->nKeyLength==0) { /* numeric key */
php_printf("%*c%ld => ", level + 1, ' ', hash_key->h);
} else { /* string key */
- /* XXX: perphaps when we are inside the class we should permit
access to
- * private & protected values
- */
- if (va_arg(args, int) && hash_key->arKey[0] == '\0') {
- return 0;
- } else {
- char *key;
- int key_len;
- key = php_addcslashes(hash_key->arKey,
hash_key->nKeyLength - 1, &key_len, 0, "'\\", 2 TSRMLS_CC);
- php_printf("%*c'", level + 1, ' ');
- PHPWRITE(key, key_len);
- php_printf("' => ");
- efree(key);
- }
+ char *key;
+ int key_len;
+ key = php_addcslashes(hash_key->arKey, hash_key->nKeyLength -
1, &key_len, 0, "'\\", 2 TSRMLS_CC);
+ php_printf("%*c'", level + 1, ' ');
+ PHPWRITE(key, key_len);
+ php_printf("' => ");
+ efree(key);
}
php_var_export(zv, level + 2 TSRMLS_CC);
PUTS (",\n");
http://cvs.php.net/co.php/php-src/ext/standard/tests/array/var_export2.phpt?r=1.1&p=1
Index: php-src/ext/standard/tests/array/var_export2.phpt
+++ php-src/ext/standard/tests/array/var_export2.phpt
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php