From 3dc38973e1d2a8e74d7efd492c83181b9076c3ed Mon Sep 17 00:00:00 2001 From: fusionate Date: Tue, 16 May 2023 18:54:11 +0000 Subject: [PATCH] Authentication [Class] - Updates for PHP 8.1 --- core/authentication/resources/classes/authentication.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/core/authentication/resources/classes/authentication.php b/core/authentication/resources/classes/authentication.php index 34a19f2015..be60a9b4d2 100644 --- a/core/authentication/resources/classes/authentication.php +++ b/core/authentication/resources/classes/authentication.php @@ -169,7 +169,7 @@ class authentication { user_logs::add($result); //debug information - if ($debug) { + if (!empty($debug)) { if ($row["authorized"]) { echo "authorized: true\n"; } @@ -179,7 +179,7 @@ class authentication { } //user is authorized - get user settings, check user cidr - if ($authorized) { + if (!empty($authorized)) { //set a session variable to indicate authorized is set to true $_SESSION['authorized'] = true; @@ -403,7 +403,7 @@ class authentication { } //authorized true //return the result - return $result; + return $result ?? false; } /**