Fix the upcast of `[attach]`
authorAlexander Ebert <ebert@woltlab.com>
Fri, 27 Dec 2024 12:09:02 +0000 (13:09 +0100)
committerAlexander Ebert <ebert@woltlab.com>
Fri, 27 Dec 2024 12:09:02 +0000 (13:09 +0100)
See https://www.woltlab.com/community/thread/310357/

wcfsetup/install/files/lib/system/html/metacode/upcast/AttachMetacodeUpcast.class.php

index b48b98ab1c724a2790343935a1d8134438a50a32..93077cf3ed6de405d67b4e57743257874e172eb2 100644 (file)
@@ -59,10 +59,10 @@ final class AttachMetacodeUpcast extends AbstractImageMetacodeUpcast
 
     private function isThumbnailWidth(Attachment $attachment, string|bool|int $width): bool
     {
-        if ($width === 'auto' || $width === false) {
+        if ($width === 'auto' || $width === false || $width === 'false') {
             return false;
         }
-        if ($width === true || $width === 0) {
+        if ($width === true || $width === 'true' || $width === 0) {
             return true;
         }
         return !($width > $attachment->thumbnailWidth);