mirror of
https://github.com/php/php-src.git
synced 2024-12-18 14:30:35 +08:00
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:
commit
4d80c3b7e0
30
ext/zip/tests/oo_addemptydir_error.phpt
Normal file
30
ext/zip/tests/oo_addemptydir_error.phpt
Normal 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
|
Loading…
Reference in New Issue
Block a user