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/Shifts_model.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'includes/model/Shifts_model.php') diff --git a/includes/model/Shifts_model.php b/includes/model/Shifts_model.php index 21abc888..6e69fe35 100644 --- a/includes/model/Shifts_model.php +++ b/includes/model/Shifts_model.php @@ -436,7 +436,7 @@ function Shift_delete($shift_id) * Update a shift. * * @param array $shift - * @return bool + * @return int Updated row count */ function Shift_update($shift) { @@ -444,7 +444,7 @@ function Shift_update($shift) $shift['name'] = ShiftType($shift['shifttype_id'])['name']; mail_shift_change(Shift($shift['SID']), $shift); - return (bool)DB::update(' + return DB::update(' UPDATE `Shifts` SET `shifttype_id` = ?, `start` = ?, -- cgit v1.2.3-54-g00ecf