From: Evan Prodromou Date: Mon, 28 Dec 2009 18:42:31 +0000 (-0800) Subject: check if other user exists before unsub X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=c07f22104094d26f7f6266c2b59f7999030fda1a;p=quix0rs-gnu-social.git check if other user exists before unsub --- 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');