From 483b2d3d29806ca40d4b22ab29962be55346107c Mon Sep 17 00:00:00 2001 From: Mikael Nordfeldth Date: Mon, 28 Jul 2014 10:11:28 +0200 Subject: [PATCH] quick fix for when there is no $cur defined --- lib/atomusernoticefeed.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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')); } -- 2.39.5