summaryrefslogtreecommitdiff
path: root/ext/zip
diff options
context:
space:
mode:
authorRemi Collet <remi@php.net>2020-03-09 09:29:34 +0100
committerRemi Collet <remi@php.net>2020-03-09 09:29:34 +0100
commitf5c1359f57e6745b2176275ccba966663fbcdb4b (patch)
tree008b4ca9eaea001bbcb075590a5feeb65dae446f /ext/zip
parentef42a7afa502005ab5732614a288476146e43eae (diff)
downloadphp-git-f5c1359f57e6745b2176275ccba966663fbcdb4b.tar.gz
proper fix
Diffstat (limited to 'ext/zip')
-rw-r--r--ext/zip/php_zip.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/ext/zip/php_zip.c b/ext/zip/php_zip.c
index d8e1f285a9..a63bef6b7b 100644
--- a/ext/zip/php_zip.c
+++ b/ext/zip/php_zip.c
@@ -1506,8 +1506,6 @@ static ZIPARCHIVE_METHOD(close)
if (err) {
#if LIBZIP_VERSION_MAJOR == 1 && LIBZIP_VERSION_MINOR == 3 && LIBZIP_VERSION_MICRO == 1
php_error_docref(NULL, E_WARNING, "zip_close have failed");
- ze_obj->err_zip = 0;
- ze_obj->err_sys = 0;
#else
php_error_docref(NULL, E_WARNING, "%s", zip_strerror(intern));
/* Save error for property reader */
@@ -1525,6 +1523,9 @@ static ZIPARCHIVE_METHOD(close)
#endif
zip_discard(intern);
#endif
+ } else {
+ ze_obj->err_zip = 0;
+ ze_obj->err_sys = 0;
}
efree(ze_obj->filename);