From f82717d839ecaf32495668b2983a6ffe5481fa0a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20D=C3=BCsterhus?= Date: Sun, 5 Feb 2012 19:11:08 +0100 Subject: [PATCH] Break if no users where found. --- file/lib/page/ChatMessagePage.class.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/file/lib/page/ChatMessagePage.class.php b/file/lib/page/ChatMessagePage.class.php index 873e95a..106bd09 100644 --- a/file/lib/page/ChatMessagePage.class.php +++ b/file/lib/page/ChatMessagePage.class.php @@ -67,8 +67,11 @@ public function readUsers() { AND fieldValue = ".intval($this->roomID); $stmt = WCF::getDB()->prepareStatement($sql); $stmt->execute(); + $userIDs = array(); while ($row = $stmt->fetchArray()) $userIDs[] = $row['userID']; + if (!count($userIDs)) return; + $sql = "SELECT * FROM