Skip to content

Commit 758c9a5

Browse files
committed
Issue #17 Check whether file exists before deleting
1 parent 0013625 commit 758c9a5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/File.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ public function __construct($content, $suffix = null, $prefix = null, $directory
5656
*/
5757
public function __destruct()
5858
{
59-
if ($this->delete) {
59+
if ($this->delete && file_exists($this->_fileName)) {
6060
unlink($this->_fileName);
6161
}
6262
}

0 commit comments

Comments
 (0)