forked from GNUsocial/gnu-social
Better handling of null values in ActivityObject::mimeTypeToObjectType
This commit is contained in:
parent
772383e84b
commit
7366ee73f5
@ -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