]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
If all file extensions are supported we have no list of comparisons
authorMikael Nordfeldth <mmn@hethane.se>
Tue, 12 Jan 2016 12:08:54 +0000 (13:08 +0100)
committerMikael Nordfeldth <mmn@hethane.se>
Tue, 12 Jan 2016 12:08:54 +0000 (13:08 +0100)
lib/util.php

index 294c03221650f4d697c7f1cc866cf6abbf8464dd..53eddc1fac20f581396cec55b339ccc4dacd7a40 100644 (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;
@@ -2461,4 +2464,4 @@ function html_sprintf()
 function _ve($var)
 {
     return var_export($var, true);
-}
\ No newline at end of file
+}