From: Mikael Nordfeldth Date: Mon, 28 Jul 2014 08:11:28 +0000 (+0200) Subject: quick fix for when there is no $cur defined X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=483b2d3d29806ca40d4b22ab29962be55346107c;p=quix0rs-gnu-social.git quick fix for when there is no $cur defined --- diff --git a/lib/atomusernoticefeed.php b/lib/atomusernoticefeed.php index 56e97880b0..d7f9b3d233 100644 --- a/lib/atomusernoticefeed.php +++ b/lib/atomusernoticefeed.php @@ -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')); }