diff options
author | Remi Collet <remi@php.net> | 2020-06-07 08:16:50 +0200 |
---|---|---|
committer | Remi Collet <remi@php.net> | 2020-06-07 08:16:50 +0200 |
commit | 06ff0e8721284f5825c6f6c4e2741d115f834806 (patch) | |
tree | 18edd8c181e81da777eb68cb225cfec247a228a6 /ext/zip/php_zip.c | |
parent | a3bfd4a1082f00eecde9c1feddbdb8adf4a928da (diff) | |
download | php-git-06ff0e8721284f5825c6f6c4e2741d115f834806.tar.gz |
move comment
Diffstat (limited to 'ext/zip/php_zip.c')
-rw-r--r-- | ext/zip/php_zip.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/ext/zip/php_zip.c b/ext/zip/php_zip.c index b275985fa8..9ac13d538a 100644 --- a/ext/zip/php_zip.c +++ b/ext/zip/php_zip.c @@ -1452,9 +1452,6 @@ PHP_METHOD(ZipArchive, open) ze_obj->filename = NULL; } - /* 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) { @@ -1466,6 +1463,9 @@ PHP_METHOD(ZipArchive, open) /* exists and is empty */ if (VCWD_STAT(resolved_path, &st) == 0 && st.st_size == 0) { php_error_docref(NULL, E_DEPRECATED, "Using empty file as ZipArchive is deprecated"); + + /* reduce BC break introduce in libzip 1.6.0 + "Do not accept empty files as valid zip archives any longer" */ flags |= ZIP_TRUNCATE; } } |