checking resource before closing zip

This commit is contained in:
Milos Stojanovic
2019-06-25 09:22:03 +02:00
parent 1bc6e7af35
commit 8ac547ea36

View File

@@ -124,7 +124,9 @@ class ZipArchiver implements Service, ArchiverInterface
$file = $this->tmpfs->readStream($this->uniqid);
$this->storage->store($destination, $name, $file['stream']);
fclose($file['stream']);
if (is_resource($file['stream'])) {
fclose($file['stream']);
}
$this->tmpfs->remove($this->uniqid);
}