From ad0fade3d38466b9f728cc5835ee9b1e31fe99c3 Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Mon, 31 May 2021 11:33:18 +0200 Subject: [PATCH] Incorrect handling of empty values for `accept` --- wcfsetup/install/files/lib/util/ImageUtil.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wcfsetup/install/files/lib/util/ImageUtil.class.php b/wcfsetup/install/files/lib/util/ImageUtil.class.php index 4776e553a9..1df79ee89c 100644 --- a/wcfsetup/install/files/lib/util/ImageUtil.class.php +++ b/wcfsetup/install/files/lib/util/ImageUtil.class.php @@ -212,7 +212,7 @@ final class ImageUtil $supportsWebP = false; if (!empty($_SERVER["HTTP_ACCEPT"])) { $acceptableMimeTypes = \array_map(static function ($acceptableMimeType) { - [$mimeType] = ArrayUtil::trim(\explode(";", $acceptableMimeType)); + [$mimeType] = ArrayUtil::trim(\explode(";", $acceptableMimeType), false); return $mimeType; }, \explode(",", $_SERVER["HTTP_ACCEPT"])); -- 2.20.1