1
0
mirror of https://github.com/Ne-Lexa/php-zip.git synced 2025-08-29 17:59:55 +02:00

Re-enable support for remote streams, fix #25

This commit is contained in:
Sébastien Vanvelthem
2018-11-02 11:53:35 +01:00
parent 9934a860c1
commit e903642893
2 changed files with 58 additions and 1 deletions

View File

@@ -41,7 +41,9 @@ class ZipNewEntry extends ZipAbstractEntry
public function getEntryContent()
{
if (is_resource($this->content)) {
rewind($this->content);
if (stream_get_meta_data($this->content)['seekable']) {
rewind($this->content);
}
return stream_get_contents($this->content);
}
return $this->content;