ID: 48375
Updated by: [email protected]
Reported By: for-bugs at hnw dot jp
-Status: Open
+Status: Assigned
Bug Type: SPL related
Operating System: *
PHP Version: 5.2.9
-Assigned To:
+Assigned To: colder
Previous Comments:
------------------------------------------------------------------------
[2009-05-24 16:19:56] for-bugs at hnw dot jp
Description:
------------
The second AppendIterator::append() call goes endless loop when its
first iterator is SplFileObject whose file has only 1 line.
Reproduce code:
---------------
<?php
$ap = new AppendIterator();
$it = new SplFileObject('data://text/plain;base64,MA==', 'r'); // "0"
$ap->append($it);
$ap->append(new ArrayIterator(array(1))); // endless
foreach ($ap as $value) {
var_dump($value);
};
Expected result:
----------------
string(1) "0"
int(1)
Actual result:
--------------
run endless.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=48375&edit=1