colder Mon Sep 29 22:45:28 2008 UTC Added files: (Branch: PHP_5_3) /php-src/ext/spl/tests array_025.phpt
Modified files: /php-src/ext/spl spl_array.c /php-src NEWS Log: MFH: Fix #46192 (Serialization of ArrayObject with objects as storage) http://cvs.php.net/viewvc.cgi/php-src/ext/spl/spl_array.c?r1=1.71.2.17.2.13.2.25&r2=1.71.2.17.2.13.2.26&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.25 php-src/ext/spl/spl_array.c:1.71.2.17.2.13.2.26 --- php-src/ext/spl/spl_array.c:1.71.2.17.2.13.2.25 Fri Sep 19 12:48:33 2008 +++ php-src/ext/spl/spl_array.c Mon Sep 29 22:45:27 2008 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: spl_array.c,v 1.71.2.17.2.13.2.25 2008/09/19 12:48:33 dmitry Exp $ */ +/* $Id: spl_array.c,v 1.71.2.17.2.13.2.26 2008/09/29 22:45:27 colder Exp $ */ #ifdef HAVE_CONFIG_H # include "config.h" @@ -1593,7 +1593,7 @@ ++p; if (*p!='m') { - if (*p!='a') { + if (*p!='a' && *p!='O' && *p!='C') { goto outexcept; } intern->ar_flags &= ~SPL_ARRAY_CLONE_MASK; http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.965.2.333&r2=1.2027.2.547.2.965.2.334&diff_format=u Index: php-src/NEWS diff -u php-src/NEWS:1.2027.2.547.2.965.2.333 php-src/NEWS:1.2027.2.547.2.965.2.334 --- php-src/NEWS:1.2027.2.547.2.965.2.333 Mon Sep 29 16:53:08 2008 +++ php-src/NEWS Mon Sep 29 22:45:28 2008 @@ -35,6 +35,8 @@ - Fixed bug #45392 (ob_start()/ob_end_clean() and memory_limit). (Ilia) - Fixed bug #45382 (timeout bug in stream_socket_enable_crypto). (vnegrier at optilian dot com, Ilia) +- Fixed bug #46192 (ArrayObject with objects as storage serialization). + (Etienne) 02 Sep 2008, PHP 5.3.0 Alpha 2 - Removed special treatment of "/tmp" in sessions for open_basedir. http://cvs.php.net/viewvc.cgi/php-src/ext/spl/tests/array_025.phpt?view=markup&rev=1.1 Index: php-src/ext/spl/tests/array_025.phpt +++ php-src/ext/spl/tests/array_025.phpt --TEST-- SPL: ArrayObject serialize with an object as storage --FILE-- <?php $obj1 = new ArrayObject(new ArrayObject(array(1,2))); $s = serialize($obj1); $obj2 = unserialize($s); print_r($obj1); echo "$s\n"; print_r($obj2); ?> --EXPECT-- ArrayObject Object ( [storage:ArrayObject:private] => ArrayObject Object ( [storage:ArrayObject:private] => Array ( [0] => 1 [1] => 2 ) ) ) C:11:"ArrayObject":76:{x:i:0;C:11:"ArrayObject":37:{x:i:0;a:2:{i:0;i:1;i:1;i:2;};m:a:0:{}};m:a:0:{}} ArrayObject Object ( [storage:ArrayObject:private] => ArrayObject Object ( [storage:ArrayObject:private] => Array ( [0] => 1 [1] => 2 ) ) ) -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php