Misc/Fixup

* HTTP_USER_AGENT is not guaranteed to be set
This commit is contained in:
Sarjuuk
2025-10-06 17:16:41 +02:00
parent 05f5b0ed34
commit a7e9ac2cf2

View File

@@ -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;