r-a-y / buddypress-followers

Follow users on your BuddyPress site. Similar to Twitter!
http://wordpress.org/plugins/buddypress-followers/
74 stars 39 forks source link

`bp_follow_stop_following()` throws error if follow does not exist #69

Closed boonebgorges closed 8 years ago

boonebgorges commented 8 years ago

bp_follow_stop_following(), if called with a leader_id/follower_id/follow_type triplet that doesn't correspond to an actual follow, will throw a notice. It has something to do with the BP_Follow object having an id of 0 in this case, which breaks the way the WHERE conditions are built.

It's not a big deal, though it's inconvenient to have to do an is-following check before calling stop_following(). It might be nice in these cases to return false or something like that.

r-a-y commented 8 years ago

Thanks @boonebgorges.

Fixed!