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:
@@ -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()) {
|
||||
|
Reference in New Issue
Block a user