From 55574904b481a13fa640c5d0de8c66dc2db55be2 Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Tue, 16 Aug 2016 20:20:24 +0200 Subject: [PATCH] Fixed image proxy --- wcfsetup/install/files/lib/action/ImageProxyAction.class.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/wcfsetup/install/files/lib/action/ImageProxyAction.class.php b/wcfsetup/install/files/lib/action/ImageProxyAction.class.php index 0c2bd92a06..e7c43e541d 100644 --- a/wcfsetup/install/files/lib/action/ImageProxyAction.class.php +++ b/wcfsetup/install/files/lib/action/ImageProxyAction.class.php @@ -48,7 +48,6 @@ class ImageProxyAction extends AbstractAction { // prepare path $fileExtension = pathinfo($url, PATHINFO_EXTENSION); $fileLocation = WCF_DIR.'images/proxy/'.substr($fileName, 0, 2).'/'.$fileName.($fileExtension ? '.'.$fileExtension : ''); - $imageData = getimagesize($fileLocation); $dir = dirname($fileLocation); if (!@file_exists($dir)) { FileUtil::makePath($dir); @@ -77,6 +76,9 @@ class ImageProxyAction extends AbstractAction { // update mtime for correct expiration calculation @touch($fileLocation); } + else { + $imageData = getimagesize($fileLocation); + } $this->executed(); @header('Content-Type: '.$imageData['mime']); -- 2.20.1