]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - actions/allrss.php
add a script to populate notice inboxes
[quix0rs-gnu-social.git] / actions / allrss.php
index b6701cfdc7e4d9f4bd87be81d90e6acdf2aca776..e49ac55401435d9cd0d4d7e262e0eaac9e58adc2 100644 (file)
@@ -45,10 +45,6 @@ class AllrssAction extends Rss10Action {
                
                $notice = $user->noticesWithFriends(0, $limit);
                                                                                        
-               # XXX: revisit constant scope
-               
-               $cnt = $notice->find();
-
                while ($notice->fetch()) {
                        $notices[] = clone($notice);
                }
@@ -72,6 +68,9 @@ class AllrssAction extends Rss10Action {
        function get_image() {
                $user = $this->user;
                $profile = $user->getProfile();
+               if (!$profile) {
+                       return NULL;
+               }
                $avatar = $profile->getAvatar(AVATAR_PROFILE_SIZE);
                return ($avatar) ? $avatar->url : NULL;
        }