From 7bcb5bf8eddb3c43b92426624bc3e783c760cc48 Mon Sep 17 00:00:00 2001 From: marcus Date: Fri, 2 Jan 2009 13:29:45 +0000 Subject: Closes #649: Added checking to report when friend add fails. git-svn-id: https://code.elgg.org/elgg/trunk@2529 36083f99-b078-4883-b0ff-0f9b5a30f544 --- actions/friends/add.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'actions') diff --git a/actions/friends/add.php b/actions/friends/add.php index 760da81b7..8e3cc67aa 100644 --- a/actions/friends/add.php +++ b/actions/friends/add.php @@ -22,7 +22,7 @@ // Get the user try { - $_SESSION['user']->addFriend($friend_guid); + if (!$_SESSION['user']->addFriend($friend_guid)) $errors = true; } catch (Exception $e) { register_error(sprintf(elgg_echo("friends:add:failure"),$friend->name)); $errors = true; -- cgit v1.2.3