From 9f3de2d24c2265e809a02413a56e2661b86b2c70 Mon Sep 17 00:00:00 2001
From: Andrew Dolgov <noreply@fakecake.org>
Date: Mon, 8 Feb 2021 22:03:27 +0300
Subject: [PATCH] login: fix profile warning

---
 classes/handler/public.php | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/classes/handler/public.php b/classes/handler/public.php
index 8a004e207..13a6af4b1 100755
--- a/classes/handler/public.php
+++ b/classes/handler/public.php
@@ -701,7 +701,7 @@ class Handler_Public extends Handler {
 				$_SESSION["bw_limit"] = !!clean($_POST["bw_limit"] ?? false);
 				$_SESSION["safe_mode"] = $safe_mode;
 
-				if (clean($_POST["profile"])) {
+				if (!empty($_POST["profile"])) {
 
 					$profile = (int) clean($_POST["profile"]);
 
@@ -712,8 +712,8 @@ class Handler_Public extends Handler {
 					if ($sth->fetch()) {
 						$_SESSION["profile"] = $profile;
  					} else {
-					    $_SESSION["profile"] = null;
-                    }
+						$_SESSION["profile"] = null;
+					}
 				}
 			} else {
 
-- 
GitLab