check if other user exists before unsub

This commit is contained in:
Evan Prodromou 2009-12-28 10:42:31 -08:00
parent a80fa17872
commit c07f221040

View File

@ -625,7 +625,11 @@ class User extends Memcached_DataObject
// Cancel their subscription, if it exists // 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'); $block->query('COMMIT');