ID:               44615
 Updated by:       [EMAIL PROTECTED]
 Reported By:      doctorrock83 at gmail dot com
-Status:           Open
+Status:           Feedback
 Bug Type:         SPL related
 Operating System: Windows XP
 PHP Version:      5.2.5
 New Comment:

Please try using this CVS snapshot:

  http://snaps.php.net/php5.2-latest.tar.gz
 
For Windows (zip):
 
  http://snaps.php.net/win32/php5.2-win32-latest.zip

For Windows (installer):

  http://snaps.php.net/win32/php5.2-win32-installer-latest.msi

Works fine on 5.2.6.


Previous Comments:
------------------------------------------------------------------------

[2008-04-02 15:36:37] doctorrock83 at gmail dot com

Description:
------------
RecursiveArrayIterator doesn't seem to handle objects stored in it
correctly.

If you store anything else into the RecursiveArrayIterator (ie :
strings, integers, or even ressources ), they are served back from the
iterator.
But if you store an object of any class into it, then it disappears
while iterating.

PS : Perhaps a RecursiveIteratorIterator bug, dunnow :-)

Reproduce code:
---------------
<?php
$a = new stdClass();

$array = array(array('z',$a),array('q','s'));

$rai = new RecursiveArrayIterator($array);

foreach (new RecursiveIteratorIterator($rai) as $t) {
    var_dump($t);
}

Expected result:
----------------
string(1) "z"
object(stdClass)#1 (0) {
}
string(1) "q"
string(1) "s"


Actual result:
--------------
string(1) "z"
string(1) "q"
string(1) "s"


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=44615&edit=1

Reply via email to