Skip to content

Commit c2257b0

Browse files
committed
CachingIterator: fixed IteratorAggregate -> Iterator conversion
1 parent 3a832a7 commit c2257b0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Latte/Runtime/CachingIterator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ public function __construct($iterator)
4141
} elseif ($iterator instanceof \IteratorAggregate) {
4242
do {
4343
$iterator = $iterator->getIterator();
44-
} while ($iterator instanceof \IteratorAggregate);
44+
} while (!$iterator instanceof \Iterator);
4545

4646
} elseif ($iterator instanceof \Traversable) {
4747
if (!$iterator instanceof \Iterator) {

0 commit comments

Comments
 (0)