summaryrefslogtreecommitdiff
path: root/includes/model/ShiftEntry_model.php
diff options
context:
space:
mode:
Diffstat (limited to 'includes/model/ShiftEntry_model.php')
-rw-r--r--includes/model/ShiftEntry_model.php4
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;
}
/**