Skip to content

Commit

Permalink
fix code redundancy. (PHPMailer#1317)
Browse files Browse the repository at this point in the history
  • Loading branch information
GaithD authored and Synchro committed Jan 5, 2018
1 parent c8613a4 commit f06d08f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/PHPMailer.php
Original file line number Diff line number Diff line change
Expand Up @@ -3918,8 +3918,9 @@ public static function _mime_types($ext = '')
'avi' => 'video/x-msvideo',
'movie' => 'video/x-sgi-movie',
];
if (array_key_exists(strtolower($ext), $mimes)) {
return $mimes[strtolower($ext)];
$ext = strtolower($ext);
if (array_key_exists($ext, $mimes)) {
return $mimes[$ext];
}

return 'application/octet-stream';
Expand Down

0 comments on commit f06d08f

Please sign in to comment.