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

View File

@ -172,6 +172,13 @@ class RealtimePlugin extends Plugin
// Add to the author's timeline // 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); $user = User::staticGet('id', $notice->profile_id);
if (!empty($user)) { if (!empty($user)) {