--TEST-- Bug #49072 (feof never returns true for damaged file in zip) --SKIPIF-- --FILE-- 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