diff --git a/classes/pref/prefs.php b/classes/pref/prefs.php
index 2d72a773279c7451b05cc9f688eb588161b99af5..8c044b49f412ef1ee21d8489433f18187df1dac6 100644
--- a/classes/pref/prefs.php
+++ b/classes/pref/prefs.php
@@ -275,7 +275,7 @@ class Pref_Prefs extends Handler_Protected {
 	}
 
 	function resetconfig(): void {
-		Prefs::reset($_SESSION["uid"], $_SESSION["profile"]);
+		Prefs::reset($_SESSION["uid"], $_SESSION["profile"] ?? null);
 
 		print "PREFS_NEED_RELOAD";
 	}