Skip to content

Commit

Permalink
Added additional file existence check on temporary file cleanup for d…
Browse files Browse the repository at this point in the history
…umpFile method
  • Loading branch information
gechetspr committed Nov 30, 2020
1 parent 17b83e3 commit d99fbef
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Filesystem.php
Original file line number Diff line number Diff line change
Expand Up @@ -695,7 +695,9 @@ public function dumpFile($filename, $content)

$this->rename($tmpFile, $filename, true);
} finally {
@unlink($tmpFile);
if (file_exists($tmpFile)) {
@unlink($tmpFile);
}
}
}

Expand Down

0 comments on commit d99fbef

Please sign in to comment.