diff options
Diffstat (limited to 'ext/zip/php_zip.c')
-rw-r--r-- | ext/zip/php_zip.c | 5 |
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); |