From dbb7324b251af3b85b8025b19ad1c28bd81ef315 Mon Sep 17 00:00:00 2001 From: Evan Prodromou Date: Sun, 18 Sep 2011 14:36:49 -0400 Subject: [PATCH] test for missing profile in ostatus queue handler --- plugins/OStatus/lib/ostatusqueuehandler.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/plugins/OStatus/lib/ostatusqueuehandler.php b/plugins/OStatus/lib/ostatusqueuehandler.php index 568e8fe391..f5284057e3 100644 --- a/plugins/OStatus/lib/ostatusqueuehandler.php +++ b/plugins/OStatus/lib/ostatusqueuehandler.php @@ -53,6 +53,13 @@ class OStatusQueueHandler extends QueueHandler $this->notice = $notice; $this->user = User::staticGet('id', $notice->profile_id); + try { + $profile = $this->notice->getProfile(); + } catch (Exception $e) { + common_log(LOG_ERR, "Can't get profile for notice; skipping: " . $e->getMessage()); + return true; + } + $this->pushUser(); foreach ($notice->getGroups() as $group) {