Add a check in Notice->asActivityObject that we're actually returning such a thing!

This commit is contained in:
Mikael Nordfeldth 2016-01-16 21:13:26 +01:00
parent 0797ee0871
commit a85a08ff35

View File

@ -2128,6 +2128,11 @@ class Notice extends Managed_DataObject
Event::handle('EndActivityObjectFromNotice', array($this, &$object));
}
if (!$object instanceof ActivityObject) {
common_log(LOG_ERR, 'Notice asActivityObject created something else for uri=='._ve($this->getUri()).': '._ve($object));
throw new ServerException('Notice asActivityObject created something else.');
}
return $object;
}