summaryrefslogtreecommitdiffstats
path: root/zip-php8.patch
diff options
context:
space:
mode:
Diffstat (limited to 'zip-php8.patch')
-rw-r--r--zip-php8.patch27
1 files changed, 27 insertions, 0 deletions
diff --git a/zip-php8.patch b/zip-php8.patch
index 6d14487..83ad3bd 100644
--- a/zip-php8.patch
+++ b/zip-php8.patch
@@ -1737,3 +1737,30 @@ index 0000000..01e0e20
+
+Deprecated: Function zip_open() is deprecated in %s on line %d
+Failure
+From d94273e08d507ede72467ee2eb3bd229410efac0 Mon Sep 17 00:00:00 2001
+From: George Peter Banyard <girgias@php.net>
+Date: Fri, 28 Aug 2020 15:41:27 +0200
+Subject: [PATCH] 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
+---
+ php8/php_zip.c | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/php8/php_zip.c b/php8/php_zip.c
+index 43c2da9..c1a569a 100644
+--- a/php8/php_zip.c
++++ b/php8/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;
+ }
+ /* }}} */
+