From: Alexander Ebert Date: Tue, 16 Aug 2016 18:20:24 +0000 (+0200) Subject: Fixed image proxy X-Git-Tag: 3.0.0_Beta_1~726 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=55574904b481a13fa640c5d0de8c66dc2db55be2;p=GitHub%2FWoltLab%2FWCF.git Fixed image proxy --- 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']);