diff options
Diffstat (limited to 'includes/model/Room_model.php')
-rw-r--r-- | includes/model/Room_model.php | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/includes/model/Room_model.php b/includes/model/Room_model.php index f153cd52..b29f68fe 100644 --- a/includes/model/Room_model.php +++ b/includes/model/Room_model.php @@ -148,14 +148,16 @@ function Room_update($room_id, $name, $from_frab, $map_url, $description) * Returns room by id. * * @param int $room_id RID - * @return array|false + * @return array|null */ function Room($room_id) { - return DB::selectOne(' + $room = DB::selectOne(' SELECT * FROM `Room` WHERE `RID` = ?', [ $room_id ]); + + return empty($room) ? null : $room; } |