Skip to content

Commit 9c3e901

Browse files
committed
prevents double call to internal iterator rewind handler
Closes #12060
1 parent d6ea7ed commit 9c3e901

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

Zend/zend_interfaces.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -585,6 +585,7 @@ ZEND_METHOD(InternalIterator, rewind) {
585585
RETURN_THROWS();
586586
}
587587

588+
intern->rewind_called = 1;
588589
if (!intern->iter->funcs->rewind) {
589590
/* Allow calling rewind() if no iteration has happened yet,
590591
* even if the iterator does not support rewinding. */

0 commit comments

Comments
 (0)