From 30c491ec80c80a8c0333c3923cc0094a4f8272fd Mon Sep 17 00:00:00 2001 From: flashwave Date: Thu, 3 Jan 2019 02:50:34 +0100 Subject: [PATCH] Fixed severe error caused by media proxy function. --- utility.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/utility.php b/utility.php index 2d48ae75..ee0cbd0d 100644 --- a/utility.php +++ b/utility.php @@ -347,9 +347,9 @@ function is_user_int($value): bool return ctype_digit(strval($value)); } -function proxy_media_url(string $url): string +function proxy_media_url(?string $url): ?string { - if (!config_get_default(false, 'Proxy', 'enabled') || is_local_url($url)) { + if (empty($url) || !config_get_default(false, 'Proxy', 'enabled') || is_local_url($url)) { return $url; }