Report the status for the WebP variant
authorAlexander Ebert <ebert@woltlab.com>
Mon, 10 May 2021 15:48:35 +0000 (17:48 +0200)
committerAlexander Ebert <ebert@woltlab.com>
Mon, 10 May 2021 15:48:35 +0000 (17:48 +0200)
wcfsetup/install/files/lib/data/style/StyleEditor.class.php

index 7da3101626c1181b93956031eecfac9b9801f258..44b27b2509546ee8df358bb4659901a43fd62a97 100644 (file)
@@ -175,14 +175,18 @@ class StyleEditor extends DatabaseObjectEditor implements IEditableCachedObject
         return $variableNames;
     }
 
-    public function createCoverPhotoVariant(?string $sourceLocation = null): void
+    /**
+     * @return null|bool
+     * @since 5.4
+     */
+    public function createCoverPhotoVariant(?string $sourceLocation = null)
     {
         if ($sourceLocation === null) {
             $sourceLocation = $this->getCoverPhotoLocation(false);
         }
 
         $outputFilenameWithoutExtension = \preg_replace('~\.[a-z]+$~', '', $sourceLocation);
-        ImageUtil::createWebpVariant($sourceLocation, $outputFilenameWithoutExtension);
+        return ImageUtil::createWebpVariant($sourceLocation, $outputFilenameWithoutExtension);
     }
 
     /**