aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2022-02-11 09:10:19 +0000
committerMario <mario@mariovavti.com>2022-02-11 09:10:19 +0000
commite74359fcfe4d97efe72a811b45526a69edae3893 (patch)
tree459210ff270f179dad2986b8a797a2308a4f1378 /include
parent23ececeb34972092f5d61431f4386c2774434ac8 (diff)
downloadvolse-hubzilla-e74359fcfe4d97efe72a811b45526a69edae3893.tar.gz
volse-hubzilla-e74359fcfe4d97efe72a811b45526a69edae3893.tar.bz2
volse-hubzilla-e74359fcfe4d97efe72a811b45526a69edae3893.zip
3rd arg in str_replace() can not be null
Diffstat (limited to 'include')
-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 ","