From 046e9bc2bf933fc1e32ecb66adcd4d6c10d42691 Mon Sep 17 00:00:00 2001 From: jmontoyaa Date: Mon, 27 Feb 2017 17:22:52 +0100 Subject: [PATCH] Fix delete action. --- main/inc/lib/display.lib.php | 10 +++++++--- main/social/friends.php | 22 +++++++--------------- 2 files changed, 14 insertions(+), 18 deletions(-) diff --git a/main/inc/lib/display.lib.php b/main/inc/lib/display.lib.php index e32cd5ca2e..7188ff23f1 100755 --- a/main/inc/lib/display.lib.php +++ b/main/inc/lib/display.lib.php @@ -2556,13 +2556,18 @@ HTML; } /** - * @param $userInfo + * @param array $userInfo * @param string $status * @param string $toolbar + * * @return string */ public static function getUserCard($userInfo, $status= '', $toolbar = '') { + if (empty($userInfo)) { + return ''; + } + if (!empty($status)) { $status = '
'.$status.'
'; } @@ -2571,7 +2576,7 @@ HTML; $toolbar = '
'.$toolbar.'
'; } - return '
+ return '
@@ -2591,5 +2596,4 @@ HTML;
'; } - } diff --git a/main/social/friends.php b/main/social/friends.php index 8557e204c4..b7fd8df13e 100755 --- a/main/social/friends.php +++ b/main/social/friends.php @@ -18,18 +18,16 @@ $this_section = SECTION_SOCIAL; $htmlHeadXtra[] = ''; $interbreadcrumb[] = array('url' => 'profile.php', 'name' => get_lang('SocialNetwork')); @@ -126,7 +118,7 @@ if (count($friends) == 0) { while ($j < $number_friends) { if (isset($friends[$j])) { $friend = $friends[$j]; - $toolBar = ''; $url = api_get_path(WEB_PATH).'main/social/profile.php?u='.$friend['friend_user_id'];