summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEvan Prodromou <evan@status.net>2010-07-13 10:59:15 -0400
committerEvan Prodromou <evan@status.net>2010-07-13 10:59:15 -0400
commit1044f27e47faf89400c8a8734cdb9db21fad84bd (patch)
tree5b2a105697f3059d4ae767976c77ea6969622961
parentd706a3e21ba88afc9e7a19652aa19eb4e8c54cd2 (diff)
handle missing profile for notices better in Rss10Action
-rw-r--r--lib/rssaction.php10
1 files changed, 8 insertions, 2 deletions
diff --git a/lib/rssaction.php b/lib/rssaction.php
index 62e3f21b6..f366db972 100644
--- a/lib/rssaction.php
+++ b/lib/rssaction.php
@@ -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,