From: Evan Prodromou Date: Sun, 25 Nov 2012 15:39:49 +0000 (-0500) Subject: If there's an exception in notice distribution, continue X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=6f424eb80f49d1e7f3c8128126fbe9a63cb502ad;p=quix0rs-gnu-social.git If there's an exception in notice distribution, continue --- diff --git a/classes/Notice.php b/classes/Notice.php index 2c404e2550..bab9a0dbfd 100644 --- a/classes/Notice.php +++ b/classes/Notice.php @@ -1031,9 +1031,15 @@ class Notice extends Managed_DataObject } foreach ($ni as $id => $source) { - $user = User::staticGet('id', $id); - if (empty($user) || $user->hasBlocked($profile) || - ($originalProfile && $user->hasBlocked($originalProfile))) { + try { + $user = User::staticGet('id', $id); + 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]); } }