diff options
Diffstat (limited to 'ext/zip/php_zip.c')
-rw-r--r-- | ext/zip/php_zip.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/ext/zip/php_zip.c b/ext/zip/php_zip.c index f131966c1f..b275985fa8 100644 --- a/ext/zip/php_zip.c +++ b/ext/zip/php_zip.c @@ -1456,7 +1456,11 @@ PHP_METHOD(ZipArchive, open) "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 */ |