Add friend can fail and still return success message
|Reported by:||costelloc||Owned by:|
In actions/friends/add.php, the return value of addFriend() is not checked. user_add_friend() can return false and the success message is still displayed. A simple fix is to check the return value and then set $errors = true;.
To test: log in to the community site and then click this link: http://community.elgg.org/action/friends/add?friend=15
It will display that you've successfully become friends with the Server Optimisation group.