Better handling of null values in ActivityObject::mimeTypeToObjectType
This commit is contained in:
parent
7229533b0f
commit
5ba2cb07ea
@ -896,6 +896,13 @@ class ActivityObject
|
||||
|
||||
static function mimeTypeToObjectType($mimeType) {
|
||||
$ot = null;
|
||||
|
||||
// Default
|
||||
|
||||
if (empty($mimeType)) {
|
||||
return self::FILE;
|
||||
}
|
||||
|
||||
$parts = explode('/', $mimeType);
|
||||
|
||||
switch ($parts[0]) {
|
||||
|
Loading…
Reference in New Issue
Block a user