diff --git a/file/lib/data/chat/room/ChatRoomAction.class.php b/file/lib/data/chat/room/ChatRoomAction.class.php index 7f70a58..d83f994 100644 --- a/file/lib/data/chat/room/ChatRoomAction.class.php +++ b/file/lib/data/chat/room/ChatRoomAction.class.php @@ -85,7 +85,9 @@ public function updatePosition() { $i = 0; WCF::getDB()->beginTransaction(); foreach ($this->parameters['data']['structure'][0] as $roomID) { - $editor = new ChatRoomEditor($roomList->search($roomID)); + $room = $roomList->search($roomID); + if ($room === null) continue; + $editor = new ChatRoomEditor($room); $editor->update(array('position' => $i++)); } WCF::getDB()->commitTransaction();