ext/zip: Change return type of zip_entry_close() to true - #23395
Merged
Conversation
LamentXU123
approved these changes
Aug 21, 2026
Member
|
@lacatoire Could you remove the test added for this improvement? Otherwise it is good. |
Member
Author
|
Is there a reason you don't add tests ? I will remove those next time |
The function has two exits: RETURN_THROWS for a bad parameter or a stale resource, and an unconditional RETURN_TRUE after closing the entry. Nothing returns false.
lacatoire
force-pushed
the
fix/zip-entry-close-true
branch
from
August 21, 2026 13:23
a499e3e to
9f59d2f
Compare
Member
|
This is just an improvement to the return type so doesn't warrant a test, there is little BC break anyways :) |
Member
|
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.
zip_entry_close()is declaredbool, but it has no failing return: invalid arguments and resources that are not zip entries throw, andzend_list_close()returns void, so the function always ends onRETURN_TRUE.zip_entry_open()is deliberately left alone: it ends onRETURN_BOOL(zr_rsrc->zf != NULL), which can genuinely be false, soboolis right there.zip_close()is alreadyvoid.truebeing a subtype ofbool, the only observable change is what Reflection reports.