Bug #48375 [Asn->Opn]: AppendIterator::append() never ends, which has SplFileObject as inner iterator
| From: | kalle@php.net | Date: | Tue, 24 Oct 2017 07:26:07 +0000 |
| Subject: | Bug #48375 [Asn->Opn]: AppendIterator::append() never ends, which has SplFileObject as inner iterator | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-212074@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=48375&edit=1
ID: 48375
Updated by: kalle@php.net
Reported by: for-bugs at hnw dot jp
Summary: AppendIterator::append() never ends, which has
SplFileObject as inner iterator
-Status: Assigned
+Status: Open
Type: Bug
Package: SPL related
Operating System: *
PHP Version: 5.2.9
-Assigned To: colder
+Assigned To:
Block user comment: N
Private report: N
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