If all file extensions are supported we have no list of comparisons

This commit is contained in:
Mikael Nordfeldth 2016-01-12 13:08:54 +01:00
parent d07640caba
commit dbe5d72e4c

View File

@ -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;