X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=lib%2Frssaction.php;h=f366db97293241a849784956f37ff3063cc12390;hb=b37c33dea2d151dcabf84357b2ea2a0b4f36be3c;hp=d591c99ed8e86684b98c0fb9400808ed01f82ef0;hpb=c3110ec8ace2ee6b9fdb3c0995c9ad465ba00a14;p=quix0rs-gnu-social.git diff --git a/lib/rssaction.php b/lib/rssaction.php index d591c99ed8..f366db9729 100644 --- a/lib/rssaction.php +++ b/lib/rssaction.php @@ -52,7 +52,7 @@ class Rss10Action extends Action * @see Action::__construct */ - function __construct($output='php://output', $indent=true) + function __construct($output='php://output', $indent=null) { parent::__construct($output, $indent); } @@ -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,