Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

internal iterator rewind handler is called twice #12060

Closed
@ju1ius

Description

@ju1ius

Description

Hi,

TheInternalIterator class (inzend_interfaces.c) uses an internalrewind_called flag to ensure that internal iterators are always rewound. This flag is checked by thezend_internal_iterator_ensure_rewound function, in the following methods:

However, in theInternalIterator::rewind() method, therewind_called flag is not properly set when the iterator has a rewind handler. As a result, the internal iterator's rewind handler is always called twice on first iteration.

This is problematic since internal iterators can perform potentially heavy initialization logic in therewind handler (like performing a query in the case of a database result-set iterator).

PHP Version

PHP 8.3-dev

Operating System

irrelevant

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp