Skip to content

Commit 469f46e

Browse files
author
Mohamed Khaled
committed
Fix accidentally removed try-catch for unrecognized file extensions
1 parent 499b5ab commit 469f46e

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/Files/DTO/File.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -375,7 +375,12 @@ private function determineMimeType(
375375

376376
$extension = pathinfo($cleanPath, PATHINFO_EXTENSION);
377377
if (!empty($extension)) {
378-
return MimeType::fromExtension($extension);
378+
try {
379+
return MimeType::fromExtension($extension);
380+
} catch (InvalidArgumentException $e) {
381+
// Extension not recognized, continue to error
382+
unset($e);
383+
}
379384
}
380385
}
381386

0 commit comments

Comments
 (0)