Merge branch 'PHP-7.4'

* PHP-7.4:
  add test
  NEWS
  Fixed bug #73119 Wrong return for ZipArchive::addEmptyDir Method
This commit is contained in:
Remi Collet 2020-02-03 10:24:57 +01:00
commit 4d80c3b7e0

View File

@ -0,0 +1,30 @@
--TEST--
ziparchive::addEmptyDir error
--SKIPIF--
<?php
/* $Id$ */
if(!extension_loaded('zip')) die('skip');
?>
--FILE--
<?php
include __DIR__ . '/utils.inc';
$zip = new ZipArchive;
if (!$zip->open(__DIR__ . '/test.zip', ZipArchive::RDONLY)) {
exit('failed');
}
var_dump($zip->addEmptyDir('emptydir'));
if ($zip->status == ZipArchive::ER_RDONLY) {
echo "OK\n";
} else if ($zip->status == ZipArchive::ER_OK) {
dump_entries_name($zip);
} else {
echo "Lost\n";
}
$zip->close();
?>
--EXPECTF--
bool(false)
OK