Slightly more robust group-membership conversion

This commit is contained in:
Evan Prodromou 2013-06-30 12:07:55 -04:00
parent 66f4a39105
commit e502bba259

View File

@ -161,8 +161,17 @@ class Group_member extends Managed_DataObject
function asActivity()
{
$member = $this->getMember();
if (!$member) {
throw new Exception("No such member: " . $this->profile_id);
}
$group = $this->getGroup();
if (!$group) {
throw new Exception("No such group: " . $this->group_id);
}
$act = new Activity();
$act->id = $this->getURI();