Catch missing profile in realtime server

This commit is contained in:
Evan Prodromou 2011-08-27 10:58:11 -04:00
parent 507fd9bd69
commit 817e1507ed
1 changed files with 7 additions and 0 deletions

View 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)) {