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.
21 lines
483 B
PHP
21 lines
483 B
PHP
--TEST--
|
|
Bug #49072 (feof never returns true for damaged file in zip)
|
|
--EXTENSIONS--
|
|
zip
|
|
--FILE--
|
|
<?php
|
|
$f = __DIR__ . '/bug49072.zip';
|
|
$o = new ZipArchive();
|
|
if (! $o->open($f, ZipArchive::CHECKCONS)) {
|
|
exit ('error can\'t open');
|
|
}
|
|
$r = $o->getStream('file1'); // this file has a wrong crc
|
|
if (!$r)die('failed to open a stream for file1');
|
|
$s = '';
|
|
while (! feof($r)) {
|
|
$s .= fread($r,1024);
|
|
}
|
|
?>
|
|
--EXPECTF--
|
|
Warning: fread(): Zip stream error: CRC error in %s on line %d
|