diff --git a/file/lib/data/chat/room/ChatRoomAction.class.php b/file/lib/data/chat/room/ChatRoomAction.class.php index 4ebdacc..dc24404 100644 --- a/file/lib/data/chat/room/ChatRoomAction.class.php +++ b/file/lib/data/chat/room/ChatRoomAction.class.php @@ -8,7 +8,7 @@ * @author Tim Düsterhus * @copyright 2010-2012 Tim Düsterhus * @license Creative Commons Attribution-NonCommercial-ShareAlike - * @package timwolla.wcf.chat + * @package be.bastelstu.wcf.chat * @subpackage data.chat.room */ class ChatRoomAction extends \wcf\data\AbstractDatabaseObjectAction { @@ -39,10 +39,9 @@ public function create() { FOR UPDATE"; $stmt = WCF::getDB()->prepareStatement($sql); $stmt->execute(); - $row = $stmt->fetchArray(); $sql = "UPDATE wcf".WCF_N."_chat_room - SET position = ".($row['max'] + 1)." + SET position = ".($stmt->fetchColumn() + 1)." WHERE roomID = ?"; $stmt = WCF::getDB()->prepareStatement($sql); $stmt->execute(array($room->roomID));