]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
same as previous, but for mime_to_ext
authorMikael Nordfeldth <mmn@hethane.se>
Tue, 12 Jan 2016 12:14:17 +0000 (13:14 +0100)
committerMikael Nordfeldth <mmn@hethane.se>
Tue, 12 Jan 2016 12:14:17 +0000 (13:14 +0100)
lib/util.php

index 53eddc1fac20f581396cec55b339ccc4dacd7a40..aacdb3ec93b539948124980429d05983dedf0e41 100644 (file)
@@ -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;