diff options
-rw-r--r-- | classes/Notice.php | 4 | ||||
-rw-r--r-- | plugins/RSSCloud/RSSCloudQueueHandler.php | 7 |
2 files changed, 9 insertions, 2 deletions
diff --git a/classes/Notice.php b/classes/Notice.php index 14477b1b5..f1b012465 100644 --- a/classes/Notice.php +++ b/classes/Notice.php @@ -583,7 +583,9 @@ class Notice extends Memcached_DataObject if ($f2p->find()) { while ($f2p->fetch()) { $f = File::staticGet($f2p->file_id); - $att[] = clone($f); + if ($f) { + $att[] = clone($f); + } } } return $att; diff --git a/plugins/RSSCloud/RSSCloudQueueHandler.php b/plugins/RSSCloud/RSSCloudQueueHandler.php index 295c26189..ef11eda2e 100644 --- a/plugins/RSSCloud/RSSCloudQueueHandler.php +++ b/plugins/RSSCloud/RSSCloudQueueHandler.php @@ -28,7 +28,12 @@ class RSSCloudQueueHandler extends QueueHandler function handle($notice) { - $profile = $notice->getProfile(); + try { + $profile = $notice->getProfile(); + } catch (Exception $e) { + common_log(LOG_ERR, "Dropping RSSCloud item for notice with bogus profile: " . $e->getMessage()); + return true; + } $notifier = new RSSCloudNotifier(); return $notifier->notify($profile); } |