don't die if database is missing a MIME type

This commit is contained in:
Shish 2020-07-07 16:07:19 +00:00
parent 153aa481da
commit de26b7f373

View file

@ -586,7 +586,11 @@ class Image
if ($this->mime===MimeType::WEBP&&$this->lossless) {
return MimeType::WEBP_LOSSLESS;
}
return $this->mime;
$m = $this->mime;
if (is_null($m)) {
$m = MimeMap::get_for_extension($this->ext)[0];
}
return $m;
}
/**