summaryrefslogtreecommitdiff
path: root/ext/zip/tests/bug11216.phpt
blob: a32e42d4e423302f8bd896340bfd14ab37aa761c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
--TEST--
Bug #11216 (::addEmptyDir() crashes when the directory already exists)
--SKIPIF--
<?php
if(!extension_loaded('zip')) die('skip');
 ?>
--FILE--
<?php
$archive = new ZipArchive();
$archive->open('__test.zip', ZIPARCHIVE::CREATE);
var_dump($archive->addEmptyDir('test'));
print_r($archive);
var_dump($archive->addEmptyDir('test'));
$archive->close();
unlink('__test.zip');
?>
--EXPECTF--
bool(true)
ZipArchive Object
(
    [lastId] => 0
    [status] => 0
    [statusSys] => 0
    [numFiles] => 1
    [filename] => %s
    [comment] => 
)
bool(false)