]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Catch missing profile in realtime server
authorEvan Prodromou <evan@status.net>
Sat, 27 Aug 2011 14:58:11 +0000 (10:58 -0400)
committerEvan Prodromou <evan@status.net>
Sat, 27 Aug 2011 14:58:11 +0000 (10:58 -0400)
plugins/Realtime/RealtimePlugin.php

index 6011bbc0356424a2254ab0e44bf5d0ca035d0ebe..d2172dcf8d13b2d80d59b4ed769d0c3b0c4dc6a3 100644 (file)
@@ -172,6 +172,13 @@ class RealtimePlugin extends Plugin
 
         // Add to the author's timeline
 
+        try {
+            $profile = $notice->getProfile();
+        } catch (Exception $e) {
+            $this->log(LOG_ERR, $e->getMessage());
+            return true;
+        }
+
         $user = User::staticGet('id', $notice->profile_id);
 
         if (!empty($user)) {