Skip to content

Commit f5c1359

Browse files
committed
proper fix
1 parent ef42a7a commit f5c1359

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

ext/zip/php_zip.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1506,8 +1506,6 @@ static ZIPARCHIVE_METHOD(close)
15061506
if (err) {
15071507
#if LIBZIP_VERSION_MAJOR == 1 && LIBZIP_VERSION_MINOR == 3 && LIBZIP_VERSION_MICRO == 1
15081508
php_error_docref(NULL, E_WARNING, "zip_close have failed");
1509-
ze_obj->err_zip = 0;
1510-
ze_obj->err_sys = 0;
15111509
#else
15121510
php_error_docref(NULL, E_WARNING, "%s", zip_strerror(intern));
15131511
/* Save error for property reader */
@@ -1525,6 +1523,9 @@ static ZIPARCHIVE_METHOD(close)
15251523
#endif
15261524
zip_discard(intern);
15271525
#endif
1526+
} else {
1527+
ze_obj->err_zip = 0;
1528+
ze_obj->err_sys = 0;
15281529
}
15291530

15301531
efree(ze_obj->filename);

0 commit comments

Comments
 (0)