X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=classes%2FUser.php;h=6708d95b6a52fea1dd6ba52abe79783ff5f7e545;hb=b0527801d9c2b84408bbfdf82bbdc5b778f72cfc;hp=484dc8c82b30a09cd19ebf92366d4a460898a60a;hpb=fa0fbd011812e9df52c9e5684d4cf953c6f75d8e;p=quix0rs-gnu-social.git 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');