From 1c0234e0caebff139f707505ae353392ef3b7372 Mon Sep 17 00:00:00 2001 From: Cash Costello Date: Sun, 19 Jun 2011 08:37:04 -0400 Subject: Fixes #3581 checks that the owner of a friends widget is a user --- views/default/widgets/friends/content.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) 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; + } } -- cgit v1.2.3