From 627944edd1be9eeddfdcf176740119a21931b0c5 Mon Sep 17 00:00:00 2001 From: Peter Knut Date: Fri, 2 Apr 2021 11:30:22 +0200 Subject: [PATCH] AdminerTheme: Fix using undefined constant --- plugins/AdminerTheme.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/plugins/AdminerTheme.php b/plugins/AdminerTheme.php index 17abf40..59d71e2 100644 --- a/plugins/AdminerTheme.php +++ b/plugins/AdminerTheme.php @@ -28,7 +28,9 @@ public function __construct($defaultTheme = "default-orange", array $themes = [] { define("PMTN_ADMINER_THEME", true); - $this->themeName = isset($_GET["username"]) && isset($themes[SERVER]) ? $themes[SERVER] : $defaultTheme; + $this->themeName = isset($_GET["username"]) && isset($_GET["server"]) && isset($themes[$_GET["server"]]) + ? $themes[$_GET["server"]] + : $defaultTheme; } /**