diff --git a/file/lib/page/ChatPage.class.php b/file/lib/page/ChatPage.class.php index 37e7c48..302ed4a 100644 --- a/file/lib/page/ChatPage.class.php +++ b/file/lib/page/ChatPage.class.php @@ -85,7 +85,12 @@ public function readData() { } $this->newestMessages = chat\message\ChatMessageList::getNewestMessages($this->room, CHAT_LASTMESSAGES); - \wcf\util\ChatUtil::writeUserData(array('lastSeen' => end($this->newestMessages)->messageID)); + try { + \wcf\util\ChatUtil::writeUserData(array('lastSeen' => end($this->newestMessages)->messageID)); + } + catch (SystemException $e) { + \wcf\util\ChatUtil::writeUserData(array('lastSeen' => 0)); + } $this->smilies = \wcf\data\smiley\SmileyCache::getInstance()->getCategorySmilies(); $this->readChatVersion();