From 820fdb99b8735c51bab4e52821efdb89063e4473 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B9=E6=99=AF=E7=AB=8B?= Date: Thu, 13 May 2021 16:51:39 +0800 Subject: [PATCH] Update Upload.php --- app/admin/controller/api/Upload.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/admin/controller/api/Upload.php b/app/admin/controller/api/Upload.php index 38121ab46..547d37b5f 100644 --- a/app/admin/controller/api/Upload.php +++ b/app/admin/controller/api/Upload.php @@ -138,7 +138,7 @@ class Upload extends Controller $info = $local->info($this->name, $this->safe, $original); if (in_array($extension, ['jpg', 'gif', 'png', 'bmp', 'jpeg', 'wbmp'])) { [$width, $height] = getimagesize($distname); - if ($width < 1 || $height < 1 && $local->del($this->name)) { + if (($width < 1 || $height < 1) && $local->del($this->name)) { return json(['uploaded' => false, 'error' => ['message' => '图片读取尺寸失败!']]); } }