]> gitweb.fluxo.info Git - lorea/elgg.git/commitdiff
Fixes #3581 checks that the owner of a friends widget is a user
authorCash Costello <cash.costello@gmail.com>
Sun, 19 Jun 2011 12:37:04 +0000 (08:37 -0400)
committerCash Costello <cash.costello@gmail.com>
Sun, 19 Jun 2011 12:37:04 +0000 (08:37 -0400)
views/default/widgets/friends/content.php

index 4c5ef5b4ad32fb91414994c457f315202c20aa9c..ec842a252739637795812bd98c0ff0d254fd8e6a 100644 (file)
@@ -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;
+       }
 }