From 6fe3f370d050c58e7b6c90d9830bf84c694790ab Mon Sep 17 00:00:00 2001 From: Austin Best Date: Sat, 9 Nov 2024 11:49:37 -0500 Subject: [PATCH] Fix server switching not working anymore --- root/app/www/public/functions/api.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/root/app/www/public/functions/api.php b/root/app/www/public/functions/api.php index b2038a4..0805ba1 100644 --- a/root/app/www/public/functions/api.php +++ b/root/app/www/public/functions/api.php @@ -16,7 +16,7 @@ function apiSetActiveServer($serverId, $serversTable = []) { global $database; - $serversTable ??= $database->getServers(); + $serversTable = $serversTable ?: $database->getServers(); $_SESSION['activeServerId'] = $serversTable[$serverId]['id']; $_SESSION['activeServerName'] = $serversTable[$serverId]['name']; $_SESSION['activeServerUrl'] = rtrim($serversTable[$serverId]['url'], '/');