From 8496ff29759b1a3c65e195ed5521fbf10fb270e7 Mon Sep 17 00:00:00 2001 From: Michael Nightingale <9887246+mnightingale@users.noreply.github.com> Date: Fri, 4 Mar 2022 14:46:41 +0000 Subject: [PATCH] Check file exists before delete --- src/IlluminateSnappyPdf.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/IlluminateSnappyPdf.php b/src/IlluminateSnappyPdf.php index 2146673..9246f8a 100644 --- a/src/IlluminateSnappyPdf.php +++ b/src/IlluminateSnappyPdf.php @@ -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); } /**