From: Mikael Nordfeldth Date: Tue, 12 Jan 2016 12:14:17 +0000 (+0100) Subject: same as previous, but for mime_to_ext X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=8c28e54ccccfdcdcfeac1817b68df0da5708f58c;p=quix0rs-gnu-social.git same as previous, but for mime_to_ext --- diff --git a/lib/util.php b/lib/util.php index 53eddc1fac..aacdb3ec93 100644 --- a/lib/util.php +++ b/lib/util.php @@ -1871,6 +1871,9 @@ function common_supported_ext_to_mime($fileext) function common_supported_mime_to_ext($mimetype) { $supported = common_config('attachments', 'supported'); + if ($supported === true) { + throw new ServerException('Supported mimetype but unknown extension relation.'); + } foreach($supported as $type => $ext) { if ($mimetype === $type) { return $ext;