Repository navigation
Fix GH-24491: Static method stream error handler replaces pending exception - #24520
Merged
Merged
Conversation
Girgias
approved these changes
Oct 23, 2026
Girgias
left a comment
Member
There was a problem hiding this comment.
Minor nit but LGTM. Thanks for the fix. :)
Member
There was a problem hiding this comment.
Please move this to the zpp subfolder.
Contributor
Author
There was a problem hiding this comment.
Moved it to Zend/tests/zpp, thanks.
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.
Since 2f7b01b,
zend_is_callable()fills in an error string even when it fails because an exception is already pending, sophp_stream_call_error_handler()threw a TypeError over the StreamException (or whatever the user error handler threw) for anyClass::methodhandler. It now only throws when nothing is pending, the same way curl already does.The same commit made
zend_parse_arg()leak that error string when it bails out on a pending exception, so it's freed there now too.Fixes GH-24491