quick fix for when there is no $cur defined

This commit is contained in:
Mikael Nordfeldth 2014-07-28 10:11:28 +02:00
parent 509f31af0e
commit 483b2d3d29
1 changed files with 4 additions and 1 deletions

View File

@ -64,7 +64,10 @@ class AtomUserNoticeFeed extends AtomNoticeFeed
$ao = $profile->asActivityObject();
array_push($ao->extra, $profile->profileInfo($cur->getProfile()));
// quick fix until we start using Profile everywhere instead of User
$scoped = !is_null($cur) ? $cur->getProfile() : null;
array_push($ao->extra, $profile->profileInfo($scoped));
$this->addAuthorRaw($ao->asString('author'));
}