Skip to content

Commit

Permalink
Unlink template only if it exists
Browse files Browse the repository at this point in the history
  • Loading branch information
MorrisJobke committed Sep 14, 2016
1 parent bf78f93 commit 2ca8645
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/mailtemplate.php
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,10 @@ public function reset(){
if (rename($absolutePath.'.bak', $absolutePath)) {
return true;
}
} else if (unlink($absolutePath)) {
return true;
} else if(file_exists($absolutePath)) {
if (unlink($absolutePath)) {
return true;
}
}
}
return !file_exists($absolutePath);
Expand Down

0 comments on commit 2ca8645

Please sign in to comment.