Merge pull request #9939 from jurassic-c/mimetype-dotname-fix

File extension to Mimetype matching fix for filenames with extra periods in them
This commit is contained in:
Hypolite Petovan 2021-02-16 18:37:50 -05:00 committed by GitHub
commit 251465f67a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1088,7 +1088,7 @@ class Mimetype
'zsh' => 'text/x-script.zsh'
];
$dot = strpos($filename, '.');
$dot = strrpos($filename, '.');
if ($dot !== false) {
$ext = strtolower(substr($filename, $dot + 1));
if (array_key_exists($ext, $mime_types)) {