mirror of
https://github.com/php/php-src.git
synced 2024-09-21 09:57:23 +00:00
7485978339
This is an automated migration of most SKIPIF extension_loaded checks.
32 lines
500 B
PHP
32 lines
500 B
PHP
--TEST--
|
|
ziparchive::addEmptyDir error
|
|
--EXTENSIONS--
|
|
zip
|
|
--SKIPIF--
|
|
<?php
|
|
/* $Id$ */
|
|
?>
|
|
--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();
|
|
?>
|
|
--EXPECT--
|
|
bool(false)
|
|
OK
|