From 300312306b2858b6b9f474a30814fe16c3e1854c Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tim=20D=C3=BCsterhus?= Date: Fri, 20 Aug 2021 09:19:28 +0200 Subject: [PATCH] Revert "Skip cover photos that cannot be read" This should rather be cleanly fixed within the UserRebuildDataWorker, while also updating the database on failure. This reverts commit c3ebf8b995927b826072cfcc72d08a9ebd93f878. --- .../lib/data/user/cover/photo/UserCoverPhoto.class.php | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/wcfsetup/install/files/lib/data/user/cover/photo/UserCoverPhoto.class.php b/wcfsetup/install/files/lib/data/user/cover/photo/UserCoverPhoto.class.php index eaf521380b..30c68c9d75 100644 --- a/wcfsetup/install/files/lib/data/user/cover/photo/UserCoverPhoto.class.php +++ b/wcfsetup/install/files/lib/data/user/cover/photo/UserCoverPhoto.class.php @@ -114,11 +114,7 @@ class UserCoverPhoto implements IWebpUserCoverPhoto return; } - $sourceLocation = $this->getLocation($this->coverPhotoExtension === 'webp'); - if (!\is_readable($sourceLocation)) { - return; - } - + $sourceLocation = WCF_DIR . 'images/coverPhotos/' . $this->getFilename($this->coverPhotoExtension === 'webp'); $outputFilenameWithoutExtension = \preg_replace('~\.[a-z]+$~', '', $sourceLocation); return ImageUtil::createWebpVariant($sourceLocation, $outputFilenameWithoutExtension); -- 2.20.1