Fix 500 error on angeltypes edit page when logged out
This commit is contained in:
parent
db4c5eec1c
commit
24f958b00d
|
@ -92,7 +92,7 @@ function angeltype_edit_controller()
|
|||
// Edit existing angeltype
|
||||
$angeltype = AngelType::findOrFail($request->input('angeltype_id'));
|
||||
|
||||
if (!auth()->user()->isAngelTypeSupporter($angeltype) && !auth()->can('admin_user_angeltypes')) {
|
||||
if (!auth()->user()?->isAngelTypeSupporter($angeltype) && !auth()->can('admin_user_angeltypes')) {
|
||||
throw_redirect(page_link_to('angeltypes'));
|
||||
}
|
||||
} else {
|
||||
|
|
Loading…
Reference in New Issue