From 7ead54a26a639ffee2500a3a33c8565a51d73800 Mon Sep 17 00:00:00 2001 From: "Shamiso.Jaravaza" <33659194+ssj365@users.noreply.github.com> Date: Tue, 3 Oct 2023 12:42:02 -0600 Subject: [PATCH] CONTRIB-9081: Fix BBB index page (#608) --- classes/meeting.php | 6 +++--- classes/output/index.php | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/classes/meeting.php b/classes/meeting.php index ad78a296b..ff2f178a9 100644 --- a/classes/meeting.php +++ b/classes/meeting.php @@ -131,9 +131,9 @@ public function update_cache() { /** * Get meeting attendees * - * @return mixed + * @return array[] */ - public function get_attendees() { + public function get_attendees(): array { return $this->get_meeting_info()->attendees ?? []; } @@ -275,7 +275,7 @@ protected function do_get_meeting_info(bool $updatecache = false): stdClass { } $meetinginfo->attendees = []; if (!empty($info['attendees'])) { - // Make sure attendees is an array of object, not a simpleXML object. + // Ensure each returned attendee is cast to an array, rather than a simpleXML object. foreach ($info['attendees'] as $attendee) { $meetinginfo->attendees[] = (array) $attendee; } diff --git a/classes/output/index.php b/classes/output/index.php index 2192a4afc..5f71a9f00 100644 --- a/classes/output/index.php +++ b/classes/output/index.php @@ -163,8 +163,8 @@ protected function get_room_attendee_list(meeting $meeting, string $role): strin $attendees = []; foreach ($meeting->get_attendees() as $attendee) { - if ((string) $attendee->role == $role) { - $attendees[] = $attendee->fullName; + if (strcmp((string) $attendee['role'], $role) === 0) { + $attendees[] = $attendee['fullName']; } }