Use new method MDWrongFileType::throw() for improved error handling

This commit is contained in:
jrenslin committed 2026-11-27 15:25:00 +01:00
1 parent 14997d5b56
commit 961a5e133d
1 file changed
+1 -1
+1 -1
View File
@@ -755,7 +755,7 @@ public static function mime_content_type(string $filepath):string {
throw new Exception("Cannot open finfo context"); throw new Exception("Cannot open finfo context");
} }
if (!($mime_type = finfo_file($finfo, $filepath))) { if (!($mime_type = finfo_file($finfo, $filepath))) {
throw new MDWrongFileType("Cannot get mime type of file: " . basename($filepath)); MDWrongFileType::throw("Cannot get mime type of file: " . basename($filepath), "");
} }
return $mime_type; return $mime_type;