Better handling of null values in ActivityObject::mimeTypeToObjectType

This commit is contained in:
Evan Prodromou 2013-06-05 16:11:51 -04:00
parent 7229533b0f
commit 5ba2cb07ea

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