From 9f59d2f3b152f3b84379a9fdb03e186f94fc0721 Mon Sep 17 00:00:00 2001 From: lacatoire Date: Tue, 18 Aug 2026 07:55:09 +0200 Subject: [PATCH] ext/zip: declare true as the return type of zip_entry_close() 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. --- ext/zip/php_zip.stub.php | 2 +- ext/zip/php_zip_arginfo.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ext/zip/php_zip.stub.php b/ext/zip/php_zip.stub.php index 2cece2791d1b..60fc47abfcfc 100644 --- a/ext/zip/php_zip.stub.php +++ b/ext/zip/php_zip.stub.php @@ -32,7 +32,7 @@ function zip_entry_open($zip_dp, $zip_entry, string $mode = "rb"): bool {} * @param resource $zip_entry */ #[\Deprecated(since: '8.0')] -function zip_entry_close($zip_entry): bool {} +function zip_entry_close($zip_entry): true {} /** * @param resource $zip_entry diff --git a/ext/zip/php_zip_arginfo.h b/ext/zip/php_zip_arginfo.h index 4f8366dc1512..2496670158da 100644 --- a/ext/zip/php_zip_arginfo.h +++ b/ext/zip/php_zip_arginfo.h @@ -1,5 +1,5 @@ /* This is a generated file, edit php_zip.stub.php instead. - * Stub hash: 206d9be6640ee7e94d68d7e075ab61bf3188cab3 */ + * Stub hash: 8f2b42d73dd8ff8729ddeff8396fa6d563eb13cb */ ZEND_BEGIN_ARG_INFO_EX(arginfo_zip_open, 0, 0, 1) ZEND_ARG_TYPE_INFO(0, filename, IS_STRING, 0) @@ -19,7 +19,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_zip_entry_open, 0, 2, _IS_BOOL, ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, mode, IS_STRING, 0, "\"rb\"") ZEND_END_ARG_INFO() -ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_zip_entry_close, 0, 1, _IS_BOOL, 0) +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_zip_entry_close, 0, 1, IS_TRUE, 0) ZEND_ARG_INFO(0, zip_entry) ZEND_END_ARG_INFO()