]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
test for missing profile in ostatus queue handler
authorEvan Prodromou <evan@status.net>
Sun, 18 Sep 2011 18:36:49 +0000 (14:36 -0400)
committerEvan Prodromou <evan@status.net>
Sun, 18 Sep 2011 18:36:49 +0000 (14:36 -0400)
plugins/OStatus/lib/ostatusqueuehandler.php

index 568e8fe391f318c29046491b8a03298eee522ed7..f5284057e3a85028f4fa290552fa544e8536be42 100644 (file)
@@ -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) {