From b4fdfc08be627315487ca60947b7d8665b526673 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tim=20D=C3=BCsterhus?= Date: Wed, 11 May 2022 12:50:10 +0200 Subject: [PATCH] Use `Header::normalize()` in `ImageUtil::browserSupportsWebp()` see #4534 --- wcfsetup/install/files/lib/util/ImageUtil.class.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/wcfsetup/install/files/lib/util/ImageUtil.class.php b/wcfsetup/install/files/lib/util/ImageUtil.class.php index 4749d88382..b5095de55b 100644 --- a/wcfsetup/install/files/lib/util/ImageUtil.class.php +++ b/wcfsetup/install/files/lib/util/ImageUtil.class.php @@ -2,6 +2,7 @@ namespace wcf\util; +use GuzzleHttp\Psr7\Header; use wcf\system\exception\SystemException; use wcf\system\image\ImageHandler; @@ -215,7 +216,7 @@ final class ImageUtil [$mimeType] = ArrayUtil::trim(\explode(";", $acceptableMimeType), false); return $mimeType; - }, \explode(",", $_SERVER["HTTP_ACCEPT"])); + }, Header::normalize($_SERVER["HTTP_ACCEPT"])); if (\in_array("image/webp", $acceptableMimeTypes)) { $supportsWebP = true; -- 2.20.1