php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #75161 AppendIterator iterate problem
Submitted: 2017-09-06 00:00 UTC Modified: 2017-09-06 02:35 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:1 (100.0%)
From: e dot a dot blinov at gmail dot com Assigned: jhdxr (profile)
Status: Closed Package: SPL related
PHP Version: 7.2.0RC1 OS: CentOS 7
Private report: No CVE-ID: None
 [2017-09-06 00:00 UTC] e dot a dot blinov at gmail dot com
Description:
------------
Bug actual for 7.1.9, 7.2.0beta2 - 7.2.0rc1
Not reproduced in 5.6.0 - 5.6.30, hhvm-3.18.4 - 3.21.0, 7.0.0 - 7.1.8, 7.2.0alpha1 - 7.2.0beta1
Online comparsion https://3v4l.org/OMDFY

My application crashed after update to 7.1.9



Test script:
---------------
$a = new \AppendIterator();
$a->append(new \ArrayIterator([1]));
    
$b = new \AppendIterator();
$b->append($a);
$b->append(new \ArrayIterator([1]));
    
foreach ($b AS $z){
    var_dump($z);
}

Expected result:
----------------
int(1)
int(1)

Actual result:
--------------
object(ArrayIterator)#4 (1) {
  ["storage":"ArrayIterator":private]=>
  array(1) {
    [0]=>
    int(1)
  }
}
int(1)

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2017-09-06 02:26 UTC] jhdxr@php.net
It seems the patch for #74977 broke this as well
 [2017-09-06 02:35 UTC] jhdxr@php.net
-Status: Open +Status: Closed -Assigned To: +Assigned To: jhdxr
 [2017-09-06 02:35 UTC] jhdxr@php.net
Since nikic has reverted the patch for bug #74977, I'm closing this one.
 
PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Tue Dec 10 08:01:24 2019 UTC