Jelajahi Sumber

Merge branch 'litlife-patch-1' into develop

wapplay 7 tahun lalu
induk
melakukan
59773d62a8
1 mengubah file dengan 2 tambahan dan 1 penghapusan
  1. 2 1
      src/PhpZip/Model/Entry/ZipSourceEntry.php

+ 2 - 1
src/PhpZip/Model/Entry/ZipSourceEntry.php

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