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 6da5164 commit 79e4d02
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion core/file_api.php
Expand Up @@ -907,7 +907,11 @@ function file_get_content_type_override( $p_filename ) {

$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;
}

/**
Expand Down

0 comments on commit 79e4d02

Please sign in to comment.