[GIT-PULLS] [php-src] PR #23395: ext/zip: Change return type of zip_entry_close() to true

[email protected] (lacatoire)
Newsgroups php.git-pulls
Message-ID <[email protected]>
Pull Request: https://github.com/php/php-src/pull/23395
Author: lacatoire

`zip_entry_close()` is declared `bool`, but it has no failing return: invalid arguments and resources that are not zip entries throw, and `zend_list_close()` returns void, so the function always ends on `RETURN_TRUE`.

`zip_entry_open()` is deliberately left alone: it ends on `RETURN_BOOL(zr_rsrc->zf != NULL)`, which can genuinely be false, so `bool` is right there. `zip_close()` is already `void`.

`true` being a subtype of `bool`, the only observable change is what Reflection reports. The added test pins both return types so the distinction is not flattened later.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.