don't die if database is missing a MIME type
This commit is contained in:
parent
153aa481da
commit
de26b7f373
1 changed files with 5 additions and 1 deletions
|
@ -586,7 +586,11 @@ class Image
|
||||||
if ($this->mime===MimeType::WEBP&&$this->lossless) {
|
if ($this->mime===MimeType::WEBP&&$this->lossless) {
|
||||||
return MimeType::WEBP_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;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Reference in a new issue