Skip to content

Commit

Permalink
CachingIterator: fixed IteratorAggregate -> Iterator conversion
Browse files Browse the repository at this point in the history
  • Loading branch information
dg committed Dec 11, 2019
1 parent 656ed01 commit c92bed4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Latte/Runtime/CachingIterator.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public function __construct($iterator)
} elseif ($iterator instanceof \IteratorAggregate) {
do {
$iterator = $iterator->getIterator();
} while ($iterator instanceof \IteratorAggregate);
} while (!$iterator instanceof \Iterator);

} elseif ($iterator instanceof \Traversable) {
if (!$iterator instanceof \Iterator) {
Expand Down

0 comments on commit c92bed4

Please sign in to comment.