1
0
mirror of https://github.com/wbbaddons/Tims-Chat.git synced 2024-12-22 21:40:08 +00:00

Fixing one problem with null

This commit is contained in:
Tim Düsterhus 2012-03-03 23:16:24 +01:00
parent 730dbd7770
commit d8c8ee2f5d

View File

@ -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();