Bug #48375 [Opn->Csd]: AppendIterator::append() never ends, which has SplFileObject as inner iterator
Edit report at https://bugs.php.net/bug.php?id=48375&edit=1
ID: 48375
Updated by: jhdxr@php.net
Reported by: for-bugs at hnw dot jp
Summary: AppendIterator::append() never ends, which has
SplFileObject as inner iterator
-Status: Open
+Status: Closed
Type: Bug
Package: SPL related
Operating System: *
PHP Version: 5.2.9
-Assigned To:
+Assigned To: jhdxr
Block user comment: N
Private report: N
New Comment:
Thank you for your bug report. This issue has already been fixed
in the latest released version of PHP, which you can download at
http://www.php.net/downloads.php
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 https://bugs.php.net/bug.php?id=48375&edit=1
Thread (5 messages)