From 6738fbeec373661839a8436824b6288aea8cbe54 Mon Sep 17 00:00:00 2001 From: Igor Scheller Date: Mon, 23 Nov 2020 23:36:54 +0100 Subject: [PATCH] Fixed 500 when editing an Angeltype while session expires --- includes/model/UserAngelTypes_model.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/includes/model/UserAngelTypes_model.php b/includes/model/UserAngelTypes_model.php index 0dcc7fb3..7cb99dea 100644 --- a/includes/model/UserAngelTypes_model.php +++ b/includes/model/UserAngelTypes_model.php @@ -74,6 +74,10 @@ function User_unconfirmed_AngelTypes($userId) */ function User_is_AngelType_supporter($user, $angeltype) { + if (!$user) { + return false; + } + $privileges = privileges_for_user($user->id); return (count(DB::select('