diff options
Diffstat (limited to 'engine/lib/users.php')
-rw-r--r-- | engine/lib/users.php | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/engine/lib/users.php b/engine/lib/users.php index 118a96b32..fcc10133f 100644 --- a/engine/lib/users.php +++ b/engine/lib/users.php @@ -754,8 +754,10 @@ function user_remove_friend($user_guid, $friend_guid) { // perform cleanup for access lists. $collections = get_user_access_collections($user_guid); - foreach ($collections as $collection) { - remove_user_from_access_collection($friend_guid, $collection->id); + if ($collections) { + foreach ($collections as $collection) { + remove_user_from_access_collection($friend_guid, $collection->id); + } } return remove_entity_relationship($user_guid, "friend", $friend_guid); |