diff options
author | 2023-07-15 21:16:23 +0200 | |
---|---|---|
committer | 2023-07-15 21:16:23 +0200 | |
commit | eaea8e664078db55dd32dd227bad34acb6c46229 (patch) | |
tree | 700c6907a9eb707aa42e7a046995ff6211e214f5 | |
parent | e5729fdaacb7fc18c3590c406cc3c50eaa0222c8 (diff) | |
download | rss-bridge-eaea8e664078db55dd32dd227bad34acb6c46229.tar.gz rss-bridge-eaea8e664078db55dd32dd227bad34acb6c46229.tar.zst rss-bridge-eaea8e664078db55dd32dd227bad34acb6c46229.zip |
fix: Undefined index: REMOTE_ADDR in non-web sapi' (#3538)
-rw-r--r-- | lib/Debug.php | 2 |
1 files changed, 1 insertions, 1 deletions
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))) { |