|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #48375 AppendIterator::append() never ends, which has SplFileObject as inner iterator
Submitted: 2009-05-24 16:19 UTC Modified: 2018-02-11 13:28 UTC
Avg. Score:3.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
From: for-bugs at hnw dot jp Assigned: jhdxr (profile)
Status: Closed Package: SPL related
PHP Version: 5.2.9 OS: *
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
Solve the problem:
41 - 20 = ?
Subscribe to this entry?

 [2009-05-24 16:19 UTC] for-bugs at hnw dot jp
The second AppendIterator::append() call goes endless loop when its first iterator is SplFileObject whose file has only 1 line.

Reproduce code:

$ap = new AppendIterator();
$it = new SplFileObject('data://text/plain;base64,MA==', 'r'); // "0"
$ap->append(new ArrayIterator(array(1))); // endless

foreach ($ap as $value) {

Expected result:
string(1) "0"

Actual result:
run endless.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2017-10-24 07:26 UTC]
-Status: Assigned +Status: Open -Assigned To: colder +Assigned To:
 [2018-02-11 13:27 UTC]
-Status: Open +Status: Closed -Assigned To: +Assigned To: jhdxr
 [2018-02-11 13:27 UTC]
Thank you for your bug report. This issue has already been fixed
in the latest released version of PHP, which you can download at

 [2018-02-11 13:28 UTC]
same cause of bug #73471
PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Tue Mar 21 20:03:47 2023 UTC