Skip to content

Commit c82223e

Browse files
committed
fix(Misc): corrects file extension retrieval
Ensures the accurate file extension is obtained by switching from `get_mime_type` to `pathinfo`. The previous method could return a full MIME type, leading to incorrect extension values.
1 parent 3c22de9 commit c82223e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

inc/Helpers/Misc.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ function get_file_infos( int $file_id ): array {
3030
return $file_infos;
3131
}
3232

33-
$file_ext = get_mime_type( $file_id );
33+
$file_ext = pathinfo( $file_path, PATHINFO_EXTENSION );
3434

3535
if ( empty( $file_ext ) ) {
3636
return $file_infos;

0 commit comments

Comments
 (0)