From 942839373fbb6a57de5c6f1503f58fa48ce8a999 Mon Sep 17 00:00:00 2001 From: gravel Date: Wed, 20 Dec 2023 20:41:52 +0000 Subject: [PATCH] Fix nonexistent room reporting in listings --- php/servers/servers-rooms.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/php/servers/servers-rooms.php b/php/servers/servers-rooms.php index 9d2cd69..607738c 100644 --- a/php/servers/servers-rooms.php +++ b/php/servers/servers-rooms.php @@ -513,10 +513,10 @@ */ public static function select_rooms(array $rooms, array|string $filter, array &$matchees = null): array { $_matchees = []; - $rooms = array_values(array_filter($rooms, function(CommunityRoom $room) use ($filter, $_matchees) { + $rooms = array_values(array_filter($rooms, function(CommunityRoom $room) use ($filter, &$_matchees) { $matchee = null; $success = $room->matched_by_list($filter, $matchee); - if ($matchee != null) $_matchees[] = $matchee; + if ($success) $_matchees[] = $matchee; return $success; })); $matchees = $_matchees;