check filename extension by lowercased version of itself

This commit is contained in:
Shish 2012-09-22 23:24:19 +01:00
parent 06426bdfe6
commit 65ce0ff4e4

View file

@ -513,6 +513,7 @@ function getMimeType($file, $ext="") {
if ($type !== false && strlen($type) > 0) return $type;
// Otherwise do it the old fashioned way
$ext = strtolower($ext);
static $exts = array(
'jpg' => 'image/jpeg', 'gif' => 'image/gif', 'png' => 'image/png',
'tif' => 'image/tiff', 'tiff' => 'image/tiff', 'ico' => 'image/x-icon',