xref: /PHP-8.3/ext/zip/tests/bug53885.phpt (revision 218fd035)
1--TEST--
2Bug #53885 (ZipArchive segfault with FL_UNCHANGED on empty archive)
3--EXTENSIONS--
4zip
5--FILE--
6<?php
7$fname = __DIR__."/test53885.zip";
8if(file_exists($fname)) unlink($fname);
9touch($fname);
10$nx=new ZipArchive();
11$nx->open($fname);
12$nx->locateName("a",ZIPARCHIVE::FL_UNCHANGED);
13$nx->statName("a",ZIPARCHIVE::FL_UNCHANGED);
14?>
15==DONE==
16--CLEAN--
17<?php
18$fname = __DIR__."/test53885.zip";
19@unlink($fname);
20?>
21--EXPECTF--
22Deprecated: ZipArchive::open(): Using empty file as ZipArchive is deprecated in %s
23==DONE==
24