diff options
author | msquare <msquare@notrademark.de> | 2018-09-02 16:55:35 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-09-02 16:55:35 +0200 |
commit | a103bc06e28f5eca6ba9c28c81ae1227d689f224 (patch) | |
tree | 759d675b621eed86b20f14abe448e83fa8d22562 /includes/model/Room_model.php | |
parent | bd8ceda6830f97247b73932b85ce41af5b8d2ab0 (diff) | |
parent | 2bebbeb1919e1d370ac5c0668e0db5ea63e73292 (diff) |
Merge pull request #452 from MyIgel/rebuild-database
Rebuild database
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; } |