forked from GNUsocial/gnu-social
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) {
|
static function mimeTypeToObjectType($mimeType) {
|
||||||
$ot = null;
|
$ot = null;
|
||||||
|
|
||||||
|
// Default
|
||||||
|
|
||||||
|
if (empty($mimeType)) {
|
||||||
|
return self::FILE;
|
||||||
|
}
|
||||||
|
|
||||||
$parts = explode('/', $mimeType);
|
$parts = explode('/', $mimeType);
|
||||||
|
|
||||||
switch ($parts[0]) {
|
switch ($parts[0]) {
|
||||||
|
Loading…
Reference in New Issue
Block a user