From 961a5e133d81d91b7fbf2e1178e41ce5e45cf6ec Mon Sep 17 00:00:00 2001 From: Joshua Ramon Enslin Date: Fri, 27 Nov 2026 15:25:00 +0100 Subject: [PATCH] Use new method MDWrongFileType::throw() for improved error handling --- src/MD_STD.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/MD_STD.php b/src/MD_STD.php index 9335779..8993242 100644 --- a/src/MD_STD.php +++ b/src/MD_STD.php @@ -755,7 +755,7 @@ public static function mime_content_type(string $filepath):string { throw new Exception("Cannot open finfo context"); } 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;