Skip to content
This repository has been archived by the owner on Jun 11, 2019. It is now read-only.

Commit

Permalink
if file exists remove it.
Browse files Browse the repository at this point in the history
  • Loading branch information
joselfonseca committed Jul 27, 2016
1 parent e4e3a9c commit 1a210cc
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Repositories/ImageRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,9 @@ public function deleteFile($comand) {
*/
private function removeFileFromDisk() {
$file = $this->destination . '/' . $this->file->path;
unlink($file);
if(file_exists($file)){
unlink($file);
}
$this->raise(new FileWasRemovedFromDisc($this->file));
}

Expand Down

0 comments on commit 1a210cc

Please sign in to comment.