If there's an exception in notice distribution, continue

This commit is contained in:
Evan Prodromou 2012-11-25 10:39:49 -05:00
parent 6aaee4e5fe
commit 6f424eb80f

View File

@ -1031,11 +1031,17 @@ class Notice extends Managed_DataObject
}
foreach ($ni as $id => $source) {
try {
$user = User::staticGet('id', $id);
if (empty($user) || $user->hasBlocked($profile) ||
if (empty($user) ||
$user->hasBlocked($profile) ||
($originalProfile && $user->hasBlocked($originalProfile))) {
unset($ni[$id]);
}
} catch (UserNoProfileException $e) {
// User doesn't have a profile; invalid; skip them.
unset($ni[$id]);
}
}
// Give plugins a chance to filter out...