]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
quick fix for when there is no $cur defined
authorMikael Nordfeldth <mmn@hethane.se>
Mon, 28 Jul 2014 08:11:28 +0000 (10:11 +0200)
committerMikael Nordfeldth <mmn@hethane.se>
Mon, 28 Jul 2014 08:11:28 +0000 (10:11 +0200)
lib/atomusernoticefeed.php

index 56e97880b0a651e76aa0c20c62eb3d83a0d1cdca..d7f9b3d2337386f0bc5b770a0256a0b0c2d58deb 100644 (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'));
         }