Revert "Skip cover photos that cannot be read"
authorTim Düsterhus <duesterhus@woltlab.com>
Fri, 20 Aug 2021 07:19:28 +0000 (09:19 +0200)
committerTim Düsterhus <duesterhus@woltlab.com>
Fri, 20 Aug 2021 07:19:28 +0000 (09:19 +0200)
This should rather be cleanly fixed within the UserRebuildDataWorker, while
also updating the database on failure.

This reverts commit c3ebf8b995927b826072cfcc72d08a9ebd93f878.

wcfsetup/install/files/lib/data/user/cover/photo/UserCoverPhoto.class.php

index eaf521380bc994d85060e0977bec635c85b2847e..30c68c9d75f23744c0e89d8b72a5bc998ce99d74 100644 (file)
@@ -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);