test for missing profile in ostatus queue handler

This commit is contained in:
Evan Prodromou 2011-09-18 14:36:49 -04:00
parent 2f1953ca25
commit dbb7324b25

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