ext/session: Fix GH-16027 session close() not called when write fails#22622
Draft
jorgsowa wants to merge 2 commits into
Draft
ext/session: Fix GH-16027 session close() not called when write fails#22622jorgsowa wants to merge 2 commits into
jorgsowa wants to merge 2 commits into
Conversation
ndossche
reviewed
Jul 6, 2026
| } | ||
|
|
||
| /* Run close() even with a pending exception, so the handler releases its resources; skip real exit()/die() (bug #60634). */ | ||
| if (EG(exception) && !zend_is_unwind_exit(EG(exception)) && !zend_is_graceful_exit(EG(exception))) { |
Member
There was a problem hiding this comment.
This dance is never a good idea.
Contributor
Author
There was a problem hiding this comment.
When I use zend_exception_save()/zend_exception_restore() there is a test failing with the message Deprecated: Creation of dynamic property UnwindExit::$previous is deprecated. Should I fix those helpers and use them? Or is there another smart way for serving those exceptions?
Member
There was a problem hiding this comment.
I believe zend_exception_save is even gone on master. But my point is that maybe close shouldn't be called anywya
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #16027