Skip to content

Commit 8945fcc

Browse files
committedJul 9, 2012
Fix #14448: 'Undefined index: jpg' in '.../core/file_api.php'
1 parent abf661e commit 8945fcc

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed
 

‎core/file_api.php

+6-2
Original file line numberDiff line numberDiff line change
@@ -1076,6 +1076,10 @@ function file_get_content_type_override( $p_filename ) {
10761076
global $g_file_download_content_type_overrides;
10771077

10781078
$t_extension = pathinfo( $p_filename, PATHINFO_EXTENSION );
1079-
1080-
return $g_file_download_content_type_overrides[$t_extension];
1079+
1080+
if ( isset ( $g_file_download_content_type_overrides[$t_extension] ) ) {
1081+
return $g_file_download_content_type_overrides[$t_extension];
1082+
}
1083+
1084+
return null;
10811085
}

0 commit comments

Comments
 (0)
Please sign in to comment.