From fdc4b7f093eab05c8aee8c72b6d6fdcdc0159ebc Mon Sep 17 00:00:00 2001 From: =?utf8?q?Joshua=20R=C3=BCsweg?= Date: Thu, 10 Jan 2019 14:39:57 +0100 Subject: [PATCH] Simplify code See #2825 --- .../files/lib/system/file/upload/UploadFile.class.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/wcfsetup/install/files/lib/system/file/upload/UploadFile.class.php b/wcfsetup/install/files/lib/system/file/upload/UploadFile.class.php index e32f155bf7..e0fdb1f0c4 100644 --- a/wcfsetup/install/files/lib/system/file/upload/UploadFile.class.php +++ b/wcfsetup/install/files/lib/system/file/upload/UploadFile.class.php @@ -99,12 +99,12 @@ class UploadFile { return null; } - if (!$this->processed) { - $imageData = getimagesize($this->location); - return 'data:'. $imageData['mime'] .';base64,'.base64_encode(file_get_contents($this->location)); + if ($this->processed) { + return $this->location; } else { - return $this->location; + $imageData = getimagesize($this->location); + return 'data:'. $imageData['mime'] .';base64,'.base64_encode(file_get_contents($this->location)); } } -- 2.20.1