1
0
mirror of https://github.com/Ne-Lexa/php-zip.git synced 2025-08-29 09:50:40 +02:00

Test streamWrapper extract (issue #24)

This commit is contained in:
wapplay
2018-10-21 01:54:30 +03:00
parent d8bb1be43b
commit e4e3a7504e
2 changed files with 112 additions and 0 deletions

View File

@@ -483,6 +483,14 @@ class ZipInputStream implements ZipInputStreamInterface
throw new ZipUnsupportMethodException($entry->getName() .
" (compression method " . $method . " is not supported)");
}
if ($content === false) {
throw new ZipException(sprintf(
'Failed to get the contents of the zip entry "%s"',
$entry->getName()
));
}
if (!$skipCheckCrc) {
$localCrc = crc32($content);
$localCrc = PHP_INT_SIZE === 4 ? sprintf('%u', $localCrc) : $localCrc;