1
0
mirror of https://github.com/Ne-Lexa/php-zip.git synced 2025-03-23 07:59:42 +01:00

Merge branch 'patch-1' of https://github.com/litlife/php-zip into litlife-patch-1

This commit is contained in:
wapplay 2018-10-09 09:55:13 +03:00
commit 9417d7dc95

View File

@ -66,12 +66,13 @@ class ZipSourceEntry extends ZipAbstractEntry
if ($this->getSize() < self::MAX_SIZE_CACHED_CONTENT_IN_MEMORY) {
$this->entryContent = $content;
} else {
$this->entryContent = fopen('php://temp', 'rb');
$this->entryContent = fopen('php://temp', 'r+b');
fwrite($this->entryContent, $content);
}
return $content;
}
if (is_resource($this->entryContent)) {
rewind($this->entryContent);
return stream_get_contents($this->entryContent, -1, 0);
}
return $this->entryContent;