From 6efd3fc86a8aa2092f03cbb77600801ca01d3310 Mon Sep 17 00:00:00 2001 From: rcsofttech85 Date: Thu, 14 Sep 2023 21:45:32 +0530 Subject: [PATCH] find and replace feature (#16) Signed-off-by: rahul --- src/FileHandler.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/FileHandler.php b/src/FileHandler.php index 773604f..a2709f1 100644 --- a/src/FileHandler.php +++ b/src/FileHandler.php @@ -292,7 +292,9 @@ private function renameTempFile(string $tempFilePath, string $filename): void private function cleanupTempFile(string $tempFilePath): void { - unlink($tempFilePath); + if (file_exists($tempFilePath)) { + unlink($tempFilePath); + } } private function createTempFileWithHeaders(array $headers): string