File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -1452,9 +1452,6 @@ PHP_METHOD(ZipArchive, open)
1452
1452
ze_obj -> filename = NULL ;
1453
1453
}
1454
1454
1455
- /* reduce BC break introduce in libzip 1.6.0
1456
- "Do not accept empty files as valid zip archives any longer" */
1457
-
1458
1455
/* open for write without option to empty the archive */
1459
1456
#ifdef ZIP_RDONLY
1460
1457
if ((flags & (ZIP_TRUNCATE | ZIP_RDONLY )) == 0 ) {
@@ -1466,6 +1463,9 @@ PHP_METHOD(ZipArchive, open)
1466
1463
/* exists and is empty */
1467
1464
if (VCWD_STAT (resolved_path , & st ) == 0 && st .st_size == 0 ) {
1468
1465
php_error_docref (NULL , E_DEPRECATED , "Using empty file as ZipArchive is deprecated" );
1466
+
1467
+ /* reduce BC break introduce in libzip 1.6.0
1468
+ "Do not accept empty files as valid zip archives any longer" */
1469
1469
flags |= ZIP_TRUNCATE ;
1470
1470
}
1471
1471
}
You can’t perform that action at this time.
0 commit comments