summaryrefslogtreecommitdiff
path: root/includes/model/ShiftTypes_model.php
diff options
context:
space:
mode:
authormsquare <msquare@notrademark.de>2018-09-02 16:55:35 +0200
committerGitHub <noreply@github.com>2018-09-02 16:55:35 +0200
commita103bc06e28f5eca6ba9c28c81ae1227d689f224 (patch)
tree759d675b621eed86b20f14abe448e83fa8d22562 /includes/model/ShiftTypes_model.php
parentbd8ceda6830f97247b73932b85ce41af5b8d2ab0 (diff)
parent2bebbeb1919e1d370ac5c0668e0db5ea63e73292 (diff)
Merge pull request #452 from MyIgel/rebuild-database
Rebuild database
Diffstat (limited to 'includes/model/ShiftTypes_model.php')
-rw-r--r--includes/model/ShiftTypes_model.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/includes/model/ShiftTypes_model.php b/includes/model/ShiftTypes_model.php
index 3d2dc9fe..599810be 100644
--- a/includes/model/ShiftTypes_model.php
+++ b/includes/model/ShiftTypes_model.php
@@ -70,7 +70,9 @@ function ShiftType_create($name, $angeltype_id, $description)
*/
function ShiftType($shifttype_id)
{
- return DB::selectOne('SELECT * FROM `ShiftTypes` WHERE `id`=?', [$shifttype_id]);
+ $shiftType = DB::selectOne('SELECT * FROM `ShiftTypes` WHERE `id`=?', [$shifttype_id]);
+
+ return empty($shiftType) ? null : $shiftType;
}
/**