colder Tue Dec 30 23:34:29 2008 UTC Modified files: (Branch: PHP_5_3) /php-src NEWS /php-src/ext/spl spl_array.c /php-src/ext/spl/tests array_018.phpt Log: MFH: Fix #45820 (Empty ArrayObject keys not allowed) http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.965.2.427&r2=1.2027.2.547.2.965.2.428&diff_format=u Index: php-src/NEWS diff -u php-src/NEWS:1.2027.2.547.2.965.2.427 php-src/NEWS:1.2027.2.547.2.965.2.428 --- php-src/NEWS:1.2027.2.547.2.965.2.427 Mon Dec 29 09:58:18 2008 +++ php-src/NEWS Tue Dec 30 23:34:29 2008 @@ -33,6 +33,7 @@ (Scott) - Fixed bug #45989 (json_decode() doesn't return NULL on certain invalid strings). (magicaltux, Scott) +- Fixed bug #45820 (Allow empty keys in ArrayObject). (Etienne) - Fixed bug #45791 (json_decode() doesn't convert 0e0 to a double). (Scott) 04 Dec 2008, PHP 5.3.0 Alpha 3 http://cvs.php.net/viewvc.cgi/php-src/ext/spl/spl_array.c?r1=1.71.2.17.2.13.2.35&r2=1.71.2.17.2.13.2.36&diff_format=u Index: php-src/ext/spl/spl_array.c diff -u php-src/ext/spl/spl_array.c:1.71.2.17.2.13.2.35 php-src/ext/spl/spl_array.c:1.71.2.17.2.13.2.36 --- php-src/ext/spl/spl_array.c:1.71.2.17.2.13.2.35 Wed Nov 19 17:53:47 2008 +++ php-src/ext/spl/spl_array.c Tue Dec 30 23:34:29 2008 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: spl_array.c,v 1.71.2.17.2.13.2.35 2008/11/19 17:53:47 lbarnaud Exp $ */ +/* $Id: spl_array.c,v 1.71.2.17.2.13.2.36 2008/12/30 23:34:29 colder Exp $ */ #ifdef HAVE_CONFIG_H # include "config.h" @@ -433,10 +433,6 @@ } switch(Z_TYPE_P(offset)) { case IS_STRING: - if (*Z_STRVAL_P(offset) == '\0') { - zend_throw_exception(spl_ce_InvalidArgumentException, "An offset must not begin with \\0 or be empty", 0 TSRMLS_CC); - return; - } Z_ADDREF_P(value); zend_symtable_update(spl_array_get_hash_table(intern, 0 TSRMLS_CC), Z_STRVAL_P(offset), Z_STRLEN_P(offset)+1, (void**)&value, sizeof(void*), NULL); return; http://cvs.php.net/viewvc.cgi/php-src/ext/spl/tests/array_018.phpt?r1=1.1.2.2.4.2&r2=1.1.2.2.4.3&diff_format=u Index: php-src/ext/spl/tests/array_018.phpt
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php