The way this was written before, it produced a warning for unregistered extensions.

This commit is contained in:
defacer
2004-05-24 11:16:06 +00:00
parent 2ef75eee2f
commit 8ccc9d060f
+5 -5
View File
@@ -78,11 +78,11 @@ function mimeinfo($element, $filename) {
);
if (eregi("\.([a-z0-9]+)$", $filename, $match)) {
$result = $mimeinfo[strtolower($match[1])][$element];
}
if (!empty($result)) {
return $result;
if(isset($mimeinfo[strtolower($match[1])][$element])) {
return $mimeinfo[strtolower($match[1])][$element];
} else {
return $mimeinfo["xxx"][$element]; // By default
}
} else {
return $mimeinfo["xxx"][$element]; // By default
}