[php-src] PR #23270: Fix GH-11591: AppendIterator with generators that yield nothing

From: Date: Fri, 14 Aug 2026 05:09:33 +0000
Subject: [php-src] PR #23270: Fix GH-11591: AppendIterator with generators that yield nothing
Groups: php.git-pulls 
Request: Send a blank email to git-pulls+get-37847@lists.php.net to get a copy of this message
Pull Request: https://github.com/php/php-src/pull/23270 Author: matthiasgoergens Appending a generator probes it by rewinding, which runs an empty generator to completion; traversing it later then throws "Cannot traverse an already closed generator". Mark generators exhausted by this probe and skip them during traversal, including after the inner array is modified. A deliberate behaviour change: appending the same probed-empty generator twice now adds two empty entries instead of throwing on the second append; consumed (once-yielded) generators still throw on re-traversal.

« previous php.git-pulls (#37847) next »