Better handling of null values in ActivityObject::mimeTypeToObjectType

This commit is contained in:
Evan Prodromou 2013-06-05 16:11:51 -04:00
parent 772383e84b
commit 7366ee73f5

View File

@ -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]) {