#48375 [Opn->Asn]: AppendIterator::append() never ends, which has SplFileObject as inner iterator
| From: | colder@php.net | Date: | Thu, 16 Jul 2009 01:07:48 +0000 |
| Subject: | #48375 [Opn->Asn]: AppendIterator::append() never ends, which has SplFileObject as inner iterator | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-139783@lists.php.net to get a copy of this message | ||
ID: 48375
Updated by: colder@php.net
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