From: Evan Prodromou Date: Sun, 18 Sep 2011 18:36:49 +0000 (-0400) Subject: test for missing profile in ostatus queue handler X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=dbb7324b251af3b85b8025b19ad1c28bd81ef315;p=quix0rs-gnu-social.git test for missing profile in ostatus queue handler --- 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) {