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

Merge pull request #82 from mbardelmeijer/patch-1

Remove ftruncate for saveAsStream
This commit is contained in:
Ne-Lexa 2021-12-12 13:42:46 +03:00 committed by GitHub
commit 9e1d4a1d7a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1537,7 +1537,7 @@ class ZipFile implements \Countable, \ArrayAccess, \Iterator
if (!\is_resource($handle)) {
throw new InvalidArgumentException('handle is not resource');
}
ftruncate($handle, 0);
$this->writeZipToStream($handle);
fclose($handle);