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:
commit
251465f67a
1 changed files with 1 additions and 1 deletions
|
@ -1088,7 +1088,7 @@ class Mimetype
|
||||||
'zsh' => 'text/x-script.zsh'
|
'zsh' => 'text/x-script.zsh'
|
||||||
];
|
];
|
||||||
|
|
||||||
$dot = strpos($filename, '.');
|
$dot = strrpos($filename, '.');
|
||||||
if ($dot !== false) {
|
if ($dot !== false) {
|
||||||
$ext = strtolower(substr($filename, $dot + 1));
|
$ext = strtolower(substr($filename, $dot + 1));
|
||||||
if (array_key_exists($ext, $mime_types)) {
|
if (array_key_exists($ext, $mime_types)) {
|
||||||
|
|
Loading…
Reference in a new issue