summaryrefslogtreecommitdiff
path: root/classes
diff options
context:
space:
mode:
Diffstat (limited to 'classes')
-rw-r--r--classes/User.php6
1 files changed, 5 insertions, 1 deletions
diff --git a/classes/User.php b/classes/User.php
index 484dc8c82..6708d95b6 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');