mirror of
https://github.com/php/php-src.git
synced 2025-08-18 06:58:55 +02:00
- MFH: Fix handling of recursive inner iterators
This commit is contained in:
parent
5f3e233ea7
commit
5ea32dc1e4
1 changed files with 3 additions and 2 deletions
|
@ -12,7 +12,7 @@
|
|||
/** @ingroup Examples
|
||||
* @brief Synchronous iteration over two iterators
|
||||
* @author Marcus Boerger
|
||||
* @version 1.1
|
||||
* @version 1.2
|
||||
*/
|
||||
class DualIterator implements Iterator
|
||||
{
|
||||
|
@ -174,6 +174,7 @@ class DualIterator implements Iterator
|
|||
{
|
||||
$it = new RecursiveDualIterator($lhs, $rhs,
|
||||
self::CURRENT_0 | self::KEY_0);
|
||||
$it = new RecursiveIteratorIterator($it);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -187,7 +188,7 @@ class DualIterator implements Iterator
|
|||
|
||||
if ($identical)
|
||||
{
|
||||
foreach(new RecursiveIteratorIterator($it) as $n)
|
||||
foreach($it as $n)
|
||||
{
|
||||
if (!$it->areIdentical())
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue