aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--views/default/widgets/friends/content.php16
1 files 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;
+ }
}