aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/network.php4
1 files changed, 4 insertions, 0 deletions
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 ","