aboutsummaryrefslogtreecommitdiff
path: root/actions/friends/add.php
diff options
context:
space:
mode:
authormarcus <marcus@36083f99-b078-4883-b0ff-0f9b5a30f544>2009-01-02 13:29:45 +0000
committermarcus <marcus@36083f99-b078-4883-b0ff-0f9b5a30f544>2009-01-02 13:29:45 +0000
commit7bcb5bf8eddb3c43b92426624bc3e783c760cc48 (patch)
treef543b9c211df901ad7109fed8558acecdd699081 /actions/friends/add.php
parent0356402c78d4b07d78ca0433e76a406e0d35ce27 (diff)
downloadelgg-7bcb5bf8eddb3c43b92426624bc3e783c760cc48.tar.gz
elgg-7bcb5bf8eddb3c43b92426624bc3e783c760cc48.tar.bz2
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
Diffstat (limited to 'actions/friends/add.php')
-rw-r--r--actions/friends/add.php2
1 files changed, 1 insertions, 1 deletions
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;