summaryrefslogtreecommitdiff
path: root/includes/model/Room_model.php
diff options
context:
space:
mode:
Diffstat (limited to 'includes/model/Room_model.php')
-rw-r--r--includes/model/Room_model.php6
1 files changed, 4 insertions, 2 deletions
diff --git a/includes/model/Room_model.php b/includes/model/Room_model.php
index 36a375aa..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
+ * @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;
}