]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
handle missing profile for notices better in Rss10Action
authorEvan Prodromou <evan@status.net>
Tue, 13 Jul 2010 14:59:15 +0000 (10:59 -0400)
committerEvan Prodromou <evan@status.net>
Tue, 13 Jul 2010 14:59:15 +0000 (10:59 -0400)
lib/rssaction.php

index 62e3f21b61dc1f074547666cb3edbba681b1990d..f366db97293241a849784956f37ff3063cc12390 100644 (file)
@@ -178,7 +178,13 @@ class Rss10Action extends Action
 
         if (count($this->notices)) {
             foreach ($this->notices as $n) {
-                $this->showItem($n);
+                try {
+                    $this->showItem($n);
+                } catch (Exception $e) {
+                    // log exceptions and continue
+                    common_log(LOG_ERR, $e->getMessage());
+                    continue;
+                }
             }
         }
 
@@ -232,7 +238,7 @@ class Rss10Action extends Action
 
     function showItem($notice)
     {
-        $profile = Profile::staticGet($notice->profile_id);
+        $profile = $notice->getProfile();
         $nurl = common_local_url('shownotice', array('notice' => $notice->id));
         $creator_uri = common_profile_uri($profile);
         $this->elementStart('item', array('rdf:about' => $notice->uri,