Bug #75161 [NEW]: AppendIterator iterate problem

From: Date: Wed, 06 Sep 2017 00:00:31 +0000
Subject: Bug #75161 [NEW]: AppendIterator iterate problem
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-210966@lists.php.net to get a copy of this message
From: e dot a dot blinov at gmail dot com Operating system: CentOS 7 PHP version: 7.2.0RC1 Package: SPL related Bug Type: Bug Bug description:AppendIterator iterate problem 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) -- Edit bug report at https://bugs.php.net/bug.php?id=75161&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=75161&r=trysnapshot54 Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=75161&r=trysnapshot55 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=75161&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=75161&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=75161&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=75161&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=75161&r=needscript Try newer version: https://bugs.php.net/fix.php?id=75161&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=75161&r=support Expected behavior: https://bugs.php.net/fix.php?id=75161&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=75161&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=75161&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=75161&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=75161&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=75161&r=dst IIS Stability: https://bugs.php.net/fix.php?id=75161&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=75161&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=75161&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=75161&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=75161&r=mysqlcfg

« previous php.bugs (#210966) next »