Skip to content

Commit

Permalink
check also wether repository is open
Browse files Browse the repository at this point in the history
  • Loading branch information
repl6669 committed May 16, 2022
1 parent fee153c commit a172ea7
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/Madnest/Madzipper/Madzipper.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ public function __construct(Filesystem $fs = null)
*/
public function __destruct()
{
if (is_object($this->repository)) {
if (is_object($this->repository) && $this->repository->isOpen()) {
$this->repository->close();
}
}
Expand Down Expand Up @@ -511,8 +511,6 @@ private function getCurrentFolderWithTrailingSlash()
return $this->currentFolder;
}

//---------------------PRIVATE FUNCTIONS-------------

/**
* @param $pathToZip
*
Expand Down

0 comments on commit a172ea7

Please sign in to comment.