Skip to content

Commit

Permalink
cleanup file regardless of the stream
Browse files Browse the repository at this point in the history
Signed-off-by: katsuren <t@k2rn.com>
  • Loading branch information
k2rn authored and Ocramius committed Jul 6, 2022
1 parent e6a31a7 commit b785859
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/UploadedFile.php
Expand Up @@ -190,9 +190,9 @@ public function moveTo($targetPath) : void

if ($this->stream instanceof StreamInterface) {
$this->stream->close();
if (is_string($this->file) && file_exists($this->file)) {
unlink($this->file);
}
}
if (is_string($this->file) && file_exists($this->file)) {
unlink($this->file);
}
break;
default:
Expand Down

0 comments on commit b785859

Please sign in to comment.