Skip to content

Commit

Permalink
Fix #14448: 'Undefined index: jpg' in '.../core/file_api.php'
Browse files Browse the repository at this point in the history
  • Loading branch information
atrol committed Jul 9, 2012
1 parent abf661e commit 8945fcc
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions core/file_api.php
Expand Up @@ -1076,6 +1076,10 @@ function file_get_content_type_override( $p_filename ) {
global $g_file_download_content_type_overrides;

$t_extension = pathinfo( $p_filename, PATHINFO_EXTENSION );

return $g_file_download_content_type_overrides[$t_extension];

if ( isset ( $g_file_download_content_type_overrides[$t_extension] ) ) {
return $g_file_download_content_type_overrides[$t_extension];
}

return null;
}

0 comments on commit 8945fcc

Please sign in to comment.