Merge branch 'PHP-7.4'

* PHP-7.4:
  NEWS
  Fixed bug #73119 Wrong return for ZipArchive::addEmptyDir Method
This commit is contained in:
Remi Collet 2020-02-03 10:09:27 +01:00
commit 5eb9cffa14
2 changed files with 7 additions and 3 deletions

View File

@ -1581,11 +1581,12 @@ static ZIPARCHIVE_METHOD(addEmptyDir)
if (idx >= 0) {
RETVAL_FALSE;
} else {
if (zip_add_dir(intern, (const char *)s) == -1) {
if (zip_dir_add(intern, (const char *)s, 0) == -1) {
RETVAL_FALSE;
} else {
zip_error_clear(intern);
RETVAL_TRUE;
}
zip_error_clear(intern);
RETVAL_TRUE;
}
if (s != dirname) {
@ -3020,6 +3021,9 @@ static PHP_MINIT_FUNCTION(zip)
REGISTER_ZIP_CLASS_CONST_LONG("EXCL", ZIP_EXCL);
REGISTER_ZIP_CLASS_CONST_LONG("CHECKCONS", ZIP_CHECKCONS);
REGISTER_ZIP_CLASS_CONST_LONG("OVERWRITE", ZIP_OVERWRITE);
#ifdef ZIP_RDONLY
REGISTER_ZIP_CLASS_CONST_LONG("RDONLY", ZIP_RDONLY);
#endif
REGISTER_ZIP_CLASS_CONST_LONG("FL_NOCASE", ZIP_FL_NOCASE);
REGISTER_ZIP_CLASS_CONST_LONG("FL_NODIR", ZIP_FL_NODIR);

Binary file not shown.