From: Alexander Ebert Date: Fri, 27 Dec 2024 12:09:02 +0000 (+0100) Subject: Fix the upcast of `[attach]` X-Git-Tag: 6.1.3_dev_1~3^2 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=7060d6094ac0298047e24be389fb3cdb32ae21fb;p=GitHub%2FWoltLab%2FWCF.git Fix the upcast of `[attach]` See https://www.woltlab.com/community/thread/310357/ --- diff --git a/wcfsetup/install/files/lib/system/html/metacode/upcast/AttachMetacodeUpcast.class.php b/wcfsetup/install/files/lib/system/html/metacode/upcast/AttachMetacodeUpcast.class.php index b48b98ab1c..93077cf3ed 100644 --- a/wcfsetup/install/files/lib/system/html/metacode/upcast/AttachMetacodeUpcast.class.php +++ b/wcfsetup/install/files/lib/system/html/metacode/upcast/AttachMetacodeUpcast.class.php @@ -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);