From dbe5d72e4c40cd2a2cdf4f89d52141cc8fd87d5d Mon Sep 17 00:00:00 2001 From: Mikael Nordfeldth Date: Tue, 12 Jan 2016 13:08:54 +0100 Subject: [PATCH] If all file extensions are supported we have no list of comparisons --- lib/util.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/util.php b/lib/util.php index 294c032216..53eddc1fac 100644 --- a/lib/util.php +++ b/lib/util.php @@ -1855,6 +1855,9 @@ function common_supported_ext_to_mime($fileext) } $supported = common_config('attachments', 'supported'); + if ($supported === true) { + throw new ServerException('Supported extension but unknown mimetype relation.'); + } foreach($supported as $type => $ext) { if ($ext === $fileext) { return $type; @@ -2461,4 +2464,4 @@ function html_sprintf() function _ve($var) { return var_export($var, true); -} \ No newline at end of file +}