bug53885.phpt 520 B

1234567891011121314151617181920212223
  1. --TEST--
  2. Bug #53885 (ZipArchive segfault with FL_UNCHANGED on empty archive)
  3. --EXTENSIONS--
  4. zip
  5. --FILE--
  6. <?php
  7. $fname = __DIR__."/test53885.zip";
  8. if(file_exists($fname)) unlink($fname);
  9. touch($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--
  22. Deprecated: ZipArchive::open(): Using empty file as ZipArchive is deprecated in %s
  23. ==DONE==