Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 79e4d02

Browse files
committedJul 9, 2012
Fix #14448: 'Undefined index: jpg' in '.../core/file_api.php'
1 parent 6da5164 commit 79e4d02

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed
 

‎core/file_api.php

+5-1
Original file line numberDiff line numberDiff line change
@@ -907,7 +907,11 @@ function file_get_content_type_override( $p_filename ) {
907907

908908
$t_extension = pathinfo( $p_filename, PATHINFO_EXTENSION );
909909

910-
return $g_file_download_content_type_overrides[$t_extension];
910+
if ( isset ( $g_file_download_content_type_overrides[$t_extension] ) ) {
911+
return $g_file_download_content_type_overrides[$t_extension];
912+
}
913+
914+
return null;
911915
}
912916

913917
/**

0 commit comments

Comments
 (0)
Please sign in to comment.