From: Cash Costello Date: Sun, 19 Jun 2011 12:37:04 +0000 (-0400) Subject: Fixes #3581 checks that the owner of a friends widget is a user X-Git-Url: https://gitweb.fluxo.info/?a=commitdiff_plain;h=1c0234e0caebff139f707505ae353392ef3b7372;p=lorea%2Felgg.git Fixes #3581 checks that the owner of a friends widget is a user --- diff --git a/views/default/widgets/friends/content.php b/views/default/widgets/friends/content.php index 4c5ef5b4a..ec842a252 100644 --- a/views/default/widgets/friends/content.php +++ b/views/default/widgets/friends/content.php @@ -13,12 +13,12 @@ $num = (int) $vars['entity']->num_display; // get the correct size $size = $vars['entity']->icon_size; -$html = $owner->listFriends('', $num, array( - 'size' => $size, - 'gallery' => true, -)); -if ($html) { - echo $html; -} else { - +if (elgg_instanceof($owner, 'user')) { + $html = $owner->listFriends('', $num, array( + 'size' => $size, + 'gallery' => true, + )); + if ($html) { + echo $html; + } }