From: Tim Düsterhus Date: Wed, 11 May 2022 10:50:10 +0000 (+0200) Subject: Use `Header::normalize()` in `ImageUtil::browserSupportsWebp()` X-Git-Tag: 6.0.0_Alpha_1~1326^2 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=b4fdfc08be627315487ca60947b7d8665b526673;p=GitHub%2FWoltLab%2FWCF.git Use `Header::normalize()` in `ImageUtil::browserSupportsWebp()` see #4534 --- 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;