From fa8d9b1183f961cb6e0f0ef5a2d1b1d3744fe35b Mon Sep 17 00:00:00 2001 From: George Peter Banyard Date: Fri, 28 Aug 2020 15:41:27 +0200 Subject: Improve type declarations for Zend APIs Voidification of Zend API which always succeeded Use bool argument types instead of int for boolean arguments Use bool return type for functions which return true/false (1/0) Use zend_result return type for functions which return SUCCESS/FAILURE as they don't follow normal boolean semantics Closes GH-6002 --- ext/zip/php_zip.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'ext/zip') diff --git a/ext/zip/php_zip.c b/ext/zip/php_zip.c index 43c2da9af6..c1a569afec 100644 --- a/ext/zip/php_zip.c +++ b/ext/zip/php_zip.c @@ -1290,7 +1290,8 @@ PHP_FUNCTION(zip_entry_close) RETURN_THROWS(); } - RETURN_BOOL(SUCCESS == zend_list_close(Z_RES_P(zip_entry))); + zend_list_close(Z_RES_P(zip_entry)); + RETURN_TRUE; } /* }}} */ -- cgit v1.2.1