[GIT-PULLS] [php-src] PR #22977: streams: tidy the wrapper error log on every open_wrapper return
[email protected] (iliaal) Fri, 31 Jul 2026 15:10:41 +0000
| Newsgroups | php.git-pulls |
|---|---|
| Message-ID | <[email protected]> |
Pull Request: https://github.com/php/php-src/pull/22977 Author: iliaal Until d75f79e2acf the tidy call sat on the single return path of `_php_stream_open_wrapper_ex()`, so it ran whether or not the opener produced a stream. The early-return refactor duplicated it into the three failure branches, and 605ff6e11bc then folded those into a shared `cleanup:` while keeping only the copy in the opener-failure branch. Openers run with REPORT_ERRORS masked and store into `FG(wrapper_logged_errors)` instead of printing, so anything stored by an opener that goes on to succeed now survives until request shutdown and is replayed by the next failure for the same wrapper. I could not build a userland reproducer: every built-in opener that stores a message returns NULL right after, and instrumenting the shared cleanup produced no hit across the test suite. The invariant is still that the list only holds messages for an open that is in flight, so this restores it rather than fixing an observable symptom.