Skip to content

Commit

Permalink
Check file exists before delete
Browse files Browse the repository at this point in the history
  • Loading branch information
mnightingale committed Apr 24, 2024
1 parent 716dcb6 commit 8496ff2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/IlluminateSnappyPdf.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ protected function filesize($filename)
*/
protected function unlink($filename)
{
return $this->fs->delete($filename);
return $this->fileExists($filename) && $this->fs->delete($filename);
}

/**
Expand Down

0 comments on commit 8496ff2

Please sign in to comment.