diff options
Diffstat (limited to 'includes/model/ShiftEntry_model.php')
-rw-r--r-- | includes/model/ShiftEntry_model.php | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/includes/model/ShiftEntry_model.php b/includes/model/ShiftEntry_model.php index bb9db49d..ebf600f3 100644 --- a/includes/model/ShiftEntry_model.php +++ b/includes/model/ShiftEntry_model.php @@ -138,7 +138,9 @@ function ShiftEntry_update($shift_entry) */ function ShiftEntry($shift_entry_id) { - return DB::selectOne('SELECT * FROM `ShiftEntry` WHERE `id` = ?', [$shift_entry_id]); + $shiftEntry = DB::selectOne('SELECT * FROM `ShiftEntry` WHERE `id` = ?', [$shift_entry_id]); + + return empty($shiftEntry) ? null : $shiftEntry; } /** |