diff --git a/application/common/library/Upload.php b/application/common/library/Upload.php index aaeada77a1e5acc22f7ceb7538a4e0ea21a4f462..da1d43179d6f33250ebca6b822f08d8e37e6018c 100644 --- a/application/common/library/Upload.php +++ b/application/common/library/Upload.php @@ -305,7 +305,7 @@ class Upload $attachment = $this->upload(); } catch (\Exception $e) { - @unlink($destFile); + is_file($uploadPath) && @unlink($uploadPath); throw new UploadException($e->getMessage()); } return $attachment;