Close session save handler after encoding failures - #224
Open
iliaal wants to merge 1 commit into
Open
Conversation
iliaal
force-pushed
the
fix/session-encode-null-still-close
branch
3 times, most recently
from
August 5, 2026 04:22
85dd04f to
062990c
Compare
php_session_save_current_state() returned before s_close() when session encoding returned NULL. It also could not invoke a user close handler while an encoding exception was pending. Either path could leave a save handler and file lock open. Continue to s_close() after encoding failures. Protect pending encoding exceptions while invoking the close handler, then restore or chain them after cleanup. Avoid the redundant generic write-failure warning when encoding already reported the failure.
iliaal
force-pushed
the
fix/session-encode-null-still-close
branch
from
August 5, 2026 12:30
062990c to
9143dfb
Compare
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.
php_session_save_current_state() skipped s_close() when encoding returned NULL. It also could not invoke a user close handler while an encoding exception was pending. Continue cleanup after either failure, protecting and restoring or chaining the pending exception around the close callback. This prevents the save handler and file lock from remaining open and avoids a redundant generic write-failure warning.