From e74359fcfe4d97efe72a811b45526a69edae3893 Mon Sep 17 00:00:00 2001 From: Mario Date: Fri, 11 Feb 2022 09:10:19 +0000 Subject: 3rd arg in str_replace() can not be null --- include/network.php | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'include/network.php') diff --git a/include/network.php b/include/network.php index 64605749d..044678a05 100644 --- a/include/network.php +++ b/include/network.php @@ -1986,6 +1986,10 @@ function getBestSupportedMimeType($mimeTypes = null, $acceptedTypes = false) { if($acceptedTypes === false) $acceptedTypes = $_SERVER['HTTP_ACCEPT']; + if (!$acceptedTypes) { + return null; + } + // Accept header is case insensitive, and whitespace isn’t important $accept = strtolower(str_replace(' ', '', $acceptedTypes)); // divide it into parts in the place of a "," -- cgit v1.2.3