]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
check if other user exists before unsub
authorEvan Prodromou <evan@status.net>
Mon, 28 Dec 2009 18:42:31 +0000 (10:42 -0800)
committerEvan Prodromou <evan@status.net>
Mon, 28 Dec 2009 18:42:31 +0000 (10:42 -0800)
classes/User.php

index 484dc8c82b30a09cd19ebf92366d4a460898a60a..6708d95b6a52fea1dd6ba52abe79783ff5f7e545 100644 (file)
@@ -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');