diff --git a/ext/zip/php_zip.c b/ext/zip/php_zip.c index 4ff362bab15d..7198fe99d31f 100644 --- a/ext/zip/php_zip.c +++ b/ext/zip/php_zip.c @@ -1463,11 +1463,7 @@ PHP_METHOD(ZipArchive, open) } /* 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 = {0}; /* exists and is empty */ diff --git a/ext/zip/php_zip.stub.php b/ext/zip/php_zip.stub.php index 8a37b2508da1..2f055e83d34d 100644 --- a/ext/zip/php_zip.stub.php +++ b/ext/zip/php_zip.stub.php @@ -82,12 +82,10 @@ class ZipArchive implements Countable * @cvalue ZIP_OVERWRITE */ public const int OVERWRITE = UNKNOWN; -#ifdef ZIP_RDONLY /** * @cvalue ZIP_RDONLY */ public const int RDONLY = UNKNOWN; -#endif /** * @cvalue ZIP_FL_NOCASE diff --git a/ext/zip/php_zip_arginfo.h b/ext/zip/php_zip_arginfo.h index 2c5191d6fbd0..f3d081daf04d 100644 --- a/ext/zip/php_zip_arginfo.h +++ b/ext/zip/php_zip_arginfo.h @@ -1,5 +1,5 @@ /* This is a generated file, edit php_zip.stub.php instead. - * Stub hash: 1f77735273373672b9c8c5b92c46e23ea99faeaf */ + * Stub hash: 030038017c7c76195c0b0dc2392696f458c2471f */ ZEND_BEGIN_ARG_INFO_EX(arginfo_zip_open, 0, 0, 1) ZEND_ARG_TYPE_INFO(0, filename, IS_STRING, 0) @@ -550,14 +550,12 @@ static zend_class_entry *register_class_ZipArchive(zend_class_entry *class_entry zend_string *const_OVERWRITE_name = zend_string_init_interned("OVERWRITE", sizeof("OVERWRITE") - 1, true); zend_declare_typed_class_constant(class_entry, const_OVERWRITE_name, &const_OVERWRITE_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG)); zend_string_release_ex(const_OVERWRITE_name, true); -#if defined(ZIP_RDONLY) zval const_RDONLY_value; ZVAL_LONG(&const_RDONLY_value, ZIP_RDONLY); zend_string *const_RDONLY_name = zend_string_init_interned("RDONLY", sizeof("RDONLY") - 1, true); zend_declare_typed_class_constant(class_entry, const_RDONLY_name, &const_RDONLY_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG)); zend_string_release_ex(const_RDONLY_name, true); -#endif zval const_FL_NOCASE_value; ZVAL_LONG(&const_FL_NOCASE_value, ZIP_FL_NOCASE);