|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
?? ??? 2021, PHP 7.4.16
+- Zip:
+ . Fixed bug #80648 (Fix for bug 79296 should be based on runtime version).
+ (cmb, Remi)
+
21 Jan 2021, PHP 7.4.15
- Core:
ze_obj->filename = NULL;
}
-#if LIBZIP_VERSION_MAJOR > 1 || LIBZIP_VERSION_MAJOR == 1 && LIBZIP_VERSION_MINOR >= 6
- /* reduce BC break introduce in libzip 1.6.0
- "Do not accept empty files as valid zip archives any longer" */
-
/* open for write without option to empty the archive */
+#ifdef ZIP_RDONLY
if ((flags & (ZIP_TRUNCATE | ZIP_RDONLY)) == 0) {
+#else
+ if ((flags & ZIP_TRUNCATE) == 0) {
+#endif
zend_stat_t st;
/* exists and is empty */
if (VCWD_STAT(resolved_path, &st) == 0 && st.st_size == 0) {
+ /* reduce BC break introduced in libzip 1.6.0
+ "Do not accept empty files as valid zip archives any longer" */
flags |= ZIP_TRUNCATE;
}
}
-#endif
intern = zip_open(resolved_path, flags, &err);
if (!intern || err) {