summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorPierre Joye <pajoye@php.net>2007-06-03 19:50:36 +0000
committerPierre Joye <pajoye@php.net>2007-06-03 19:50:36 +0000
commitfd2e66bd05022b023379de86577e3498fded0e96 (patch)
treea654b801a8f98951ed063ef19d23c30f91c800c2 /ext
parentef952b0383745f4543007076080b85829367018e (diff)
downloadphp-git-fd2e66bd05022b023379de86577e3498fded0e96.tar.gz
- PECL #11216 test
Diffstat (limited to 'ext')
-rw-r--r--ext/zip/tests/bug11216.phpt27
1 files changed, 27 insertions, 0 deletions
diff --git a/ext/zip/tests/bug11216.phpt b/ext/zip/tests/bug11216.phpt
new file mode 100644
index 0000000000..b5fa9b93bd
--- /dev/null
+++ b/ext/zip/tests/bug11216.phpt
@@ -0,0 +1,27 @@
+--TEST--
+Bug #11216 (::addEmptyDir() crashes when the directory already exists)
+--SKIPIF--
+<?php
+/* $Id$ */
+if(!extension_loaded('zip')) die('skip');
+ ?>
+--FILE--
+<?php
+$archive = new ZipArchive();
+$archive->open('__test.zip', ZIPARCHIVE::CREATE);
+var_dump($archive->addEmptyDir('test'));
+var_dump($archive->addEmptyDir('test'));
+$archive->close();
+unlink('__test.zip');
+?>
+--EXPECT--
+bool(true)
+ZipArchive Object
+(
+ [status] => 0
+ [statusSys] => 0
+ [numFiles] => 1
+ [filename] =>
+ [comment] =>
+)
+bool(false)