From 8021e45eb2a88f1388a8ce52c981d8977c2d38e6 Mon Sep 17 00:00:00 2001 From: David Anderson Date: Wed, 20 Mar 2024 12:59:49 -0700 Subject: [PATCH] web: fix error in team display: array_unique() doesn't work on objects --- html/inc/team.inc | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/html/inc/team.inc b/html/inc/team.inc index 7bb320606c6..ea9464c996a 100644 --- a/html/inc/team.inc +++ b/html/inc/team.inc @@ -188,13 +188,15 @@ function display_team_page($team, $user) { if (count($team->new_members)) { $first = true; $x = ""; - foreach ($team->new_members as $a) { + foreach ($team->new_members as $id) { + $u = BoincUser::lookup_id($id); + if (!$u) continue; if ($first) { $first = false; } else { $x .= " · "; } - $x .= user_links($a, BADGE_HEIGHT_MEDIUM); + $x .= user_links($u, BADGE_HEIGHT_MEDIUM); } } row2(tra('New members in last day'), $x); @@ -354,7 +356,7 @@ function new_member_list($teamid) { foreach ($deltas as $delta) { $u = BoincUser::lookup_id($delta->userid); if ($u->teamid == $teamid) { - $new_members[] = $u; // they might have later quit + $new_members[] = $u->id; // they might have later quit } } return array_unique($new_members);