File tree Expand file tree Collapse file tree 2 files changed +10
-5
lines changed Expand file tree Collapse file tree 2 files changed +10
-5
lines changed Original file line number Diff line number Diff line change @@ -2,6 +2,10 @@ PHP NEWS
2
2
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3
3
?? ??? 2021, PHP 7.4.16
4
4
5
+ - Zip:
6
+ . Fixed bug #80648 (Fix for bug 79296 should be based on runtime version).
7
+ (cmb, Remi)
8
+
5
9
21 Jan 2021, PHP 7.4.15
6
10
7
11
- Core:
Original file line number Diff line number Diff line change @@ -1473,20 +1473,21 @@ static ZIPARCHIVE_METHOD(open)
1473
1473
ze_obj -> filename = NULL ;
1474
1474
}
1475
1475
1476
- #if LIBZIP_VERSION_MAJOR > 1 || LIBZIP_VERSION_MAJOR == 1 && LIBZIP_VERSION_MINOR >= 6
1477
- /* reduce BC break introduce in libzip 1.6.0
1478
- "Do not accept empty files as valid zip archives any longer" */
1479
-
1480
1476
/* open for write without option to empty the archive */
1477
+ #ifdef ZIP_RDONLY
1481
1478
if ((flags & (ZIP_TRUNCATE | ZIP_RDONLY )) == 0 ) {
1479
+ #else
1480
+ if ((flags & ZIP_TRUNCATE ) == 0 ) {
1481
+ #endif
1482
1482
zend_stat_t st ;
1483
1483
1484
1484
/* exists and is empty */
1485
1485
if (VCWD_STAT (resolved_path , & st ) == 0 && st .st_size == 0 ) {
1486
+ /* reduce BC break introduced in libzip 1.6.0
1487
+ "Do not accept empty files as valid zip archives any longer" */
1486
1488
flags |= ZIP_TRUNCATE ;
1487
1489
}
1488
1490
}
1489
- #endif
1490
1491
1491
1492
intern = zip_open (resolved_path , flags , & err );
1492
1493
if (!intern || err ) {
You can’t perform that action at this time.
0 commit comments