From d8c8ee2f5d635c71faacd350bb9194bf709503da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20D=C3=BCsterhus?= Date: Sat, 3 Mar 2012 23:16:24 +0100 Subject: [PATCH] Fixing one problem with null --- file/lib/data/chat/room/ChatRoomAction.class.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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();