From a157004f4aefaa5e2265f852f9432becedee1d66 Mon Sep 17 00:00:00 2001 From: msquare Date: Sun, 23 Jul 2017 11:46:54 +0200 Subject: handle failed db queries in Db class --- includes/model/Room_model.php | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'includes/model/Room_model.php') diff --git a/includes/model/Room_model.php b/includes/model/Room_model.php index 17617b39..fdd9dddc 100644 --- a/includes/model/Room_model.php +++ b/includes/model/Room_model.php @@ -35,7 +35,7 @@ function Room_delete($room_id) */ function Room_create($name, $from_frab, $public, $number = null) { - $result = DB::insert(' + DB::insert(' INSERT INTO `Room` (`Name`, `FromPentabarf`, `show`, `Number`) VALUES (?, ?, ?, ?) ', @@ -46,9 +46,6 @@ function Room_create($name, $from_frab, $public, $number = null) (int)$number, ] ); - if (!$result) { - return false; - } return DB::getPdo()->lastInsertId(); } -- cgit v1.3.1