1
0
mirror of https://github.com/Ne-Lexa/php-zip.git synced 2025-07-31 12:40:09 +02:00

fix bug issue #8 - Error if the file is empty

This commit is contained in:
wapplay-home-linux
2017-11-11 17:21:01 +03:00
parent 810b7ca741
commit 6688f474b5
6 changed files with 22 additions and 20 deletions

View File

@@ -151,7 +151,10 @@ class ZipReadEntry extends ZipAbstractEntry
fseek($this->inputStream, $pos);
// Get raw entry content
$content = fread($this->inputStream, $this->getCompressedSize());
$content = '';
if ($this->getCompressedSize() > 0) {
$content = fread($this->inputStream, $this->getCompressedSize());
}
// Strong Encryption Specification - WinZip AES
if ($this->isEncrypted()) {