From c07f22104094d26f7f6266c2b59f7999030fda1a Mon Sep 17 00:00:00 2001 From: Evan Prodromou Date: Mon, 28 Dec 2009 10:42:31 -0800 Subject: [PATCH] check if other user exists before unsub --- classes/User.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/classes/User.php b/classes/User.php index 484dc8c82b..6708d95b6a 100644 --- a/classes/User.php +++ b/classes/User.php @@ -625,7 +625,11 @@ class User extends Memcached_DataObject // Cancel their subscription, if it exists - subs_unsubscribe_to($other->getUser(),$this->getProfile()); + $otherUser = User::staticGet('id', $other->id); + + if (!empty($otherUser)) { + subs_unsubscribe_to($otherUser, $this->getProfile()); + } $block->query('COMMIT'); -- 2.39.5