aboutsummaryrefslogtreecommitdiff
path: root/views/default
diff options
context:
space:
mode:
authorcash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-12-30 21:34:01 +0000
committercash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-12-30 21:34:01 +0000
commitdc21869c31ec39fc48e6d045462a09aed568fe40 (patch)
tree2f5cfa0a8bd00e5b961f7379589e807aecbcd2a9 /views/default
parent4b3f5ecbab46e13201bf06e55dbe5b71ae80a55e (diff)
downloadelgg-dc21869c31ec39fc48e6d045462a09aed568fe40.tar.gz
elgg-dc21869c31ec39fc48e6d045462a09aed568fe40.tar.bz2
put a catch in for a bad owner in the friends widget
git-svn-id: http://code.elgg.org/elgg/trunk@7778 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'views/default')
-rw-r--r--views/default/widgets/friends/content.php9
1 files changed, 5 insertions, 4 deletions
diff --git a/views/default/widgets/friends/content.php b/views/default/widgets/friends/content.php
index 2f9ab71ea..e0385027d 100644
--- a/views/default/widgets/friends/content.php
+++ b/views/default/widgets/friends/content.php
@@ -9,8 +9,8 @@
*/
-// owner of the profile page
-$owner = get_user($vars['entity']->owner_guid);
+// owner of the widget
+$owner = $vars['entity']->getOwnerEntity();
// the number of friends to display
$num = (int) $vars['entity']->num_display;
@@ -19,8 +19,9 @@ $num = (int) $vars['entity']->num_display;
$size = $vars['entity']->icon_size;
// Get the user's friends
-$friends = $owner->getFriends("", $num);
-
+if ($owner) {
+ $friends = $owner->getFriends("", $num);
+}
// If there are any friends to view, view them
if (is_array($friends) && sizeof($friends) > 0) {