summaryrefslogtreecommitdiff
path: root/includes/controller/shifts_controller.php
diff options
context:
space:
mode:
authormsquare <msquare@notrademark.de>2016-11-23 22:31:11 +0100
committermsquare <msquare@notrademark.de>2016-11-23 22:31:11 +0100
commit3fd30add3c7f66cef8e40d80183591b6d2126db7 (patch)
tree699c845459e0edb73312de87b8ef1986d6903e36 /includes/controller/shifts_controller.php
parentbe8c47a1755183ea2cdd46cf8d1b0aafe4031ae8 (diff)
fix NPE
Diffstat (limited to 'includes/controller/shifts_controller.php')
-rw-r--r--includes/controller/shifts_controller.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/includes/controller/shifts_controller.php b/includes/controller/shifts_controller.php
index f273c097..3086b948 100644
--- a/includes/controller/shifts_controller.php
+++ b/includes/controller/shifts_controller.php
@@ -1,5 +1,6 @@
<?php
+use Engelsystem\ShiftSignupState;
function shift_link($shift) {
return page_link_to('shifts') . '&action=view&shift_id=' . $shift['SID'];
}
@@ -200,7 +201,7 @@ function shift_controller() {
$angeltypes = AngelTypes();
$user_shifts = Shifts_by_user($user);
- $shift_signup_state = null;
+ $shift_signup_state = new ShiftSignupState(ShiftSignupState::OCCUPIED, 0);
foreach ($angeltypes as $angeltype) {
$angeltype_signup_state = Shift_signup_allowed($user, $shift, $angeltype, null, $user_shifts);
if ($shift_signup_state == null) {