fix code redundancy. (#1317)

This commit is contained in:
Gaith 2018-01-05 05:37:19 -04:00 committed by Marcus Bointon
parent c8613a447b
commit f06d08f6a6
1 changed files with 3 additions and 2 deletions

View File

@ -3918,8 +3918,9 @@ class PHPMailer
'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';