Skip to content

ext/zip: addGlob() and addPattern() ignore their default options. - #23108

Open
devnexen wants to merge 1 commit into
php:PHP-8.4from
devnexen:ext_zip_add_glob_pattern
Open

ext/zip: addGlob() and addPattern() ignore their default options.#23108
devnexen wants to merge 1 commit into
php:PHP-8.4from
devnexen:ext_zip_add_glob_pattern

Conversation

@devnexen

@devnexen devnexen commented Aug 7, 2026

Copy link
Copy Markdown
Member

php_zip_parse_options() held the defaults but only ran for a non-empty options array, so opts stayed zeroed otherwise: comp_method 0 is CM_STORE and flags 0 drops FL_OVERWRITE. Entries were therefore stored uncompressed, and an already present entry name failed the call instead of being replaced. The defaults now live in PHP_ZIP_DEFAULT_OPTIONS, applied at declaration.

php_zip_parse_options() held the defaults but only ran for a non-empty
options array, so opts stayed zeroed otherwise: comp_method 0 is CM_STORE
and flags 0 drops FL_OVERWRITE. Entries were therefore stored uncompressed,
and an already present entry name failed the call instead of being replaced.
The defaults now live in PHP_ZIP_DEFAULT_OPTIONS, applied at declaration.
@devnexen
devnexen marked this pull request as ready for review August 7, 2026 19:40
@devnexen
devnexen requested a review from LamentXU123 as a code owner August 7, 2026 19:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant