From: namarpi at yahoo dot com Operating system: Windows PHP version: 5.4.13 Package: SPL related Bug Type: Bug Bug description:SPL RecursiveArrayIterator::offsetSet with ArrayObject fails but stdClass works
Description: ------------ Trying to modify an array through RecursiveIteratorIterator iterator. The successful modification depends on how the array object was constructed. Fails: $array_object = new ArrayObject( $array, 0, "RecursiveArrayIterator" ); Works: $object = json_decode( json_encode( $array )); I am confused, because I expect the same behavior on both iterators. Attached a detailed test script, which tells more than my bad English text. Maybe I am escaping something? Test script: --------------- http://madarak.net/php_reports/spl-recursion.txt Expected result: ---------------- Modified ArrayObject object after using RecursiveArrayIterator::offsetSet/offsetUnset methods. Actual result: -------------- There are no effects on ArrayObject object after calling RecursiveArrayIterator::offsetSet/offsetUnset methods. -- Edit bug report at https://bugs.php.net/bug.php?id=64431&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=64431&r=trysnapshot54 Try a snapshot (PHP 5.3): https://bugs.php.net/fix.php?id=64431&r=trysnapshot53 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=64431&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=64431&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=64431&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=64431&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=64431&r=needscript Try newer version: https://bugs.php.net/fix.php?id=64431&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=64431&r=support Expected behavior: https://bugs.php.net/fix.php?id=64431&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=64431&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=64431&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=64431&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=64431&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=64431&r=dst IIS Stability: https://bugs.php.net/fix.php?id=64431&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=64431&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=64431&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=64431&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=64431&r=mysqlcfg