diff --git a/src/UploadedFile.php b/src/UploadedFile.php index 93e94195..e918697f 100644 --- a/src/UploadedFile.php +++ b/src/UploadedFile.php @@ -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: