Merge branch 'PHP-8.2' into PHP-8.3

* PHP-8.2:
  Prevents double call to internal iterator rewind handler
  adds failing test case for #12060
This commit is contained in:
George Peter Banyard 2023-09-05 10:36:16 +01:00
commit d7273c5963
10 changed files with 235 additions and 2 deletions

View file

@ -623,6 +623,7 @@ ZEND_METHOD(InternalIterator, rewind) {
RETURN_THROWS();
}
intern->rewind_called = 1;
if (!intern->iter->funcs->rewind) {
/* Allow calling rewind() if no iteration has happened yet,
* even if the iterator does not support rewinding. */