Skip to content

Commit

Permalink
Merge pull request #82 from mbardelmeijer/patch-1
Browse files Browse the repository at this point in the history
Remove ftruncate for saveAsStream
  • Loading branch information
Ne-Lexa authored Dec 12, 2021
2 parents 66168de + 0251dbf commit 9e1d4a1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ZipFile.php
Original file line number Diff line number Diff line change
Expand Up @@ -1537,7 +1537,7 @@ public function saveAsStream($handle): self
if (!\is_resource($handle)) {
throw new InvalidArgumentException('handle is not resource');
}
ftruncate($handle, 0);

$this->writeZipToStream($handle);
fclose($handle);

Expand Down

0 comments on commit 9e1d4a1

Please sign in to comment.