diff --git a/includes/controller/shift_entries_controller.php b/includes/controller/shift_entries_controller.php index 760ff84f..0951a8a5 100644 --- a/includes/controller/shift_entries_controller.php +++ b/includes/controller/shift_entries_controller.php @@ -210,7 +210,7 @@ function shift_entry_create_controller_user(Shift $shift, AngelType $angeltype): $request = request(); $signup_user = auth()->user(); - $needed_angeltype = (new AngelType())->forceFill(NeededAngeltype_by_Shift_and_Angeltype($shift, $angeltype)); + $needed_angeltype = (new AngelType())->forceFill(NeededAngeltype_by_Shift_and_Angeltype($shift, $angeltype) ?: []); $shift_entries = $shift->shiftEntries() ->where('angel_type_id', $angeltype->id) ->get(); diff --git a/includes/pages/admin_user.php b/includes/pages/admin_user.php index 6ec9bd86..fbd681c2 100644 --- a/includes/pages/admin_user.php +++ b/includes/pages/admin_user.php @@ -289,7 +289,7 @@ function admin_user() $user_source->email = $request->postData('eemail'); } - $nick = trim($request->get('eNick')); + $nick = trim((string)$request->get('eNick')); $nickValid = (new Username())->validate($nick); $changed_nick = false;