1
0
mirror of https://github.com/php/php-src.git synced 2026-04-19 22:11:12 +02:00
Files
archived-php-src/ext/zip/tests/bug53885.phpt
Remi Collet 5215f072af - bump zip extension version to 1.15.6
- add ZipArchive::LIBZIP_VERSION
- skip bug53885.phpt with libzip 1.6.0 (empty file is no more valid archive)
2020-01-27 16:47:28 +01:00

26 lines
571 B
PHP

--TEST--
Bug #53885 (ZipArchive segfault with FL_UNCHANGED on empty archive)
--SKIPIF--
<?php
if(!extension_loaded('zip')) die('skip');
if(version_compare(ZipArchive::LIBZIP_VERSION, '1.6', '>=')) die('skip libzip too recent');
?>
--FILE--
<?php
$fname = __DIR__."/test53885.zip";
if(file_exists($fname)) unlink($fname);
touch($fname);
$nx=new ZipArchive();
$nx->open($fname);
$nx->locateName("a",ZIPARCHIVE::FL_UNCHANGED);
$nx->statName("a",ZIPARCHIVE::FL_UNCHANGED);
?>
==DONE==
--CLEAN--
<?php
$fname = __DIR__."/test53885.zip";
unlink($fname);
?>
--EXPECT--
==DONE==