From c48335e702361eec3818a6b1021d443fee9037f5 Mon Sep 17 00:00:00 2001 From: msquare Date: Fri, 7 Oct 2016 17:22:48 +0200 Subject: improve shift rendering --- includes/model/ShiftEntry_model.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'includes/model/ShiftEntry_model.php') diff --git a/includes/model/ShiftEntry_model.php b/includes/model/ShiftEntry_model.php index 425b92e8..63127bc7 100644 --- a/includes/model/ShiftEntry_model.php +++ b/includes/model/ShiftEntry_model.php @@ -110,12 +110,16 @@ function ShiftEntries_finished_by_user($user) { * @param int $angeltype_id */ function ShiftEntries_by_shift_and_angeltype($shift_id, $angeltype_id) { - return sql_select(" + $result = sql_select(" SELECT * FROM `ShiftEntry` WHERE `SID`=" . sql_escape($shift_id) . " AND `TID`=" . sql_escape($angeltype_id) . " "); + if ($result === false) { + engelsystem_error("Unable to load shift entries."); + } + return $result; } /** -- cgit v1.2.3-54-g00ecf