We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ef42a7a commit f5c1359Copy full SHA for f5c1359
ext/zip/php_zip.c
@@ -1506,8 +1506,6 @@ static ZIPARCHIVE_METHOD(close)
1506
if (err) {
1507
#if LIBZIP_VERSION_MAJOR == 1 && LIBZIP_VERSION_MINOR == 3 && LIBZIP_VERSION_MICRO == 1
1508
php_error_docref(NULL, E_WARNING, "zip_close have failed");
1509
- ze_obj->err_zip = 0;
1510
- ze_obj->err_sys = 0;
1511
#else
1512
php_error_docref(NULL, E_WARNING, "%s", zip_strerror(intern));
1513
/* Save error for property reader */
@@ -1525,6 +1523,9 @@ static ZIPARCHIVE_METHOD(close)
1525
1523
#endif
1526
1524
zip_discard(intern);
1527
+ } else {
+ ze_obj->err_zip = 0;
1528
+ ze_obj->err_sys = 0;
1529
}
1530
1531
efree(ze_obj->filename);
0 commit comments