mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2024-11-22 01:25:28 +03:00
fix: Undefined index: REMOTE_ADDR in non-web sapi' (#3538)
This commit is contained in:
parent
e5729fdaac
commit
eaea8e6640
1 changed files with 1 additions and 1 deletions
|
@ -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))) {
|
||||
|
|
Loading…
Reference in a new issue