File tree Expand file tree Collapse file tree 1 file changed +15
-15
lines changed Expand file tree Collapse file tree 1 file changed +15
-15
lines changed Original file line number Diff line number Diff line change @@ -1503,26 +1503,26 @@ static ZIPARCHIVE_METHOD(close)
1503
1503
ze_obj = Z_ZIP_P (self );
1504
1504
1505
1505
err = zip_close (intern );
1506
-
1507
- /* Save error for property reader */
1508
- #if LIBZIP_VERSION_MAJOR < 1
1509
- zip_error_get (obj -> za , & ze_obj -> err_zip , & ze_obj -> err_sys );
1510
- #else
1511
- {
1512
- zip_error_t * ziperr ;
1513
-
1514
- ziperr = zip_get_error (intern );
1515
- ze_obj -> err_zip = zip_error_code_zip (ziperr );
1516
- ze_obj -> err_sys = zip_error_code_system (ziperr );
1517
- zip_error_fini (ziperr );
1518
- }
1519
- #endif
1520
-
1521
1506
if (err ) {
1522
1507
#if LIBZIP_VERSION_MAJOR == 1 && LIBZIP_VERSION_MINOR == 3 && LIBZIP_VERSION_MICRO == 1
1523
1508
php_error_docref (NULL , E_WARNING , "zip_close have failed" );
1509
+ ze_obj -> err_zip = 0 ;
1510
+ ze_obj -> err_sys = 0 ;
1524
1511
#else
1525
1512
php_error_docref (NULL , E_WARNING , "%s" , zip_strerror (intern ));
1513
+ /* Save error for property reader */
1514
+ #if LIBZIP_VERSION_MAJOR < 1
1515
+ zip_error_get (intern , & ze_obj -> err_zip , & ze_obj -> err_sys );
1516
+ #else
1517
+ {
1518
+ zip_error_t * ziperr ;
1519
+
1520
+ ziperr = zip_get_error (intern );
1521
+ ze_obj -> err_zip = zip_error_code_zip (ziperr );
1522
+ ze_obj -> err_sys = zip_error_code_system (ziperr );
1523
+ zip_error_fini (ziperr );
1524
+ }
1525
+ #endif
1526
1526
zip_discard (intern );
1527
1527
#endif
1528
1528
}
You can’t perform that action at this time.
0 commit comments