diff --git a/lib/Debug.php b/lib/Debug.php index f6a8d105..48dbb31a 100644 --- a/lib/Debug.php +++ b/lib/Debug.php @@ -7,7 +7,7 @@ class Debug */ public static function isEnabled(): bool { - $ip = $_SERVER['REMOTE_ADDR']; + $ip = $_SERVER['REMOTE_ADDR'] ?? 'x.y.z.1'; $enableDebugMode = Configuration::getConfig('system', 'enable_debug_mode'); $debugModeWhitelist = Configuration::getConfig('system', 'debug_mode_whitelist') ?: []; if ($enableDebugMode && ($debugModeWhitelist === [] || in_array($ip, $debugModeWhitelist))) {