From a7e9ac2cf2e1adb31577b130feecd21e8fc006b2 Mon Sep 17 00:00:00 2001 From: Sarjuuk Date: Mon, 6 Oct 2025 17:16:41 +0200 Subject: [PATCH] Misc/Fixup * HTTP_USER_AGENT is not guaranteed to be set --- includes/user.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/user.class.php b/includes/user.class.php index e310239f..cfa8673a 100644 --- a/includes/user.class.php +++ b/includes/user.class.php @@ -43,7 +43,7 @@ class User $_SESSION['dataKey'] = Util::createHash(); // just some random numbers for identification purpose self::$dataKey = $_SESSION['dataKey']; - self::$agent = $_SERVER['HTTP_USER_AGENT']; + self::$agent = $_SERVER['HTTP_USER_AGENT'] ?? ''; if (!self::$ip) return false;