mirror of
https://github.com/prasathmani/tinyfilemanager
synced 2024-06-12 19:02:13 +02:00
Fix for unknown extension.
This commit is contained in:
parent
5e0544dc7f
commit
b4c059a078
|
@ -3040,7 +3040,11 @@ function fm_get_file_mimes($extension)
|
|||
$fileTypes['php'] = ['application/x-php'];
|
||||
$fileTypes['html'] = ['text/html'];
|
||||
$fileTypes['txt'] = ['text/plain'];
|
||||
return $fileTypes[$extension];
|
||||
if (array_key_exists($extension, $fileTypes)) {
|
||||
return $fileTypes[$extension];
|
||||
} else {
|
||||
return 'application/octet-stream';
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue