More type fixes

This commit is contained in:
Alex Cabal 2025-02-26 15:11:36 -06:00
parent a5a19f947f
commit 99b5fd66f2
17 changed files with 103 additions and 122 deletions

View file

@ -23,7 +23,12 @@ enum ImageMimeType: string{
return null;
}
$mimeType = mime_content_type($path);
try{
$mimeType = mime_content_type($path);
}
catch(\Safe\Exceptions\FileinfoException){
return null;
}
$mimeType = match($mimeType){
'image/x-ms-bmp', 'image/x-bmp' => 'image/bmp',