diff options
author | Igor Scheller <igor.scheller@igorshp.de> | 2018-09-15 14:58:31 +0200 |
---|---|---|
committer | Igor Scheller <igor.scheller@igorshp.de> | 2018-09-15 14:58:31 +0200 |
commit | d0abc27c079f058c40a74b89e54bd21ba4aad53e (patch) | |
tree | 2d42f2a3c99d4a01930832c4e257bd550cbe9ac5 /includes/model/Shifts_model.php | |
parent | 13d2786b7b51df927c8976dc767cc27e88bc8e84 (diff) | |
parent | 5456fea5031000a6325cdcae5f1e9d4c16b6ed50 (diff) |
Merge remote-tracking branch 'MyIgel/translations'
Diffstat (limited to 'includes/model/Shifts_model.php')
-rw-r--r-- | includes/model/Shifts_model.php | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/includes/model/Shifts_model.php b/includes/model/Shifts_model.php index b5e3a205..74facc0a 100644 --- a/includes/model/Shifts_model.php +++ b/includes/model/Shifts_model.php @@ -293,7 +293,9 @@ function Shift_free_entries($needed_angeltype, $shift_entries) $taken++; } } - return max(0, $needed_angeltype['count'] - $taken); + + $neededAngels = !empty($needed_angeltype) ? $needed_angeltype['count'] : 0; + return max(0, $neededAngels - $taken); } /** |