Avoid trying to get property of non-object
This commit is contained in:
parent
d1765af0c5
commit
0e79e907b5
@ -32,7 +32,7 @@ $admin = uUtils::postBool('admin', false);
|
||||
|
||||
$lang = (new uLang($config))->getStrings();
|
||||
|
||||
if ($auth->user->login === $login || empty($action) || empty($login) || !$auth->isAuthenticated() || !$auth->isAdmin()) {
|
||||
if (($auth->user && $auth->user->login === $login) || empty($action) || empty($login) || !$auth->isAuthenticated() || !$auth->isAdmin()) {
|
||||
uUtils::exitWithError($lang["servererror"]);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user