mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-04-01 22:35:21 +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
|
public static function isEnabled(): bool
|
||||||
{
|
{
|
||||||
$ip = $_SERVER['REMOTE_ADDR'];
|
$ip = $_SERVER['REMOTE_ADDR'] ?? 'x.y.z.1';
|
||||||
$enableDebugMode = Configuration::getConfig('system', 'enable_debug_mode');
|
$enableDebugMode = Configuration::getConfig('system', 'enable_debug_mode');
|
||||||
$debugModeWhitelist = Configuration::getConfig('system', 'debug_mode_whitelist') ?: [];
|
$debugModeWhitelist = Configuration::getConfig('system', 'debug_mode_whitelist') ?: [];
|
||||||
if ($enableDebugMode && ($debugModeWhitelist === [] || in_array($ip, $debugModeWhitelist))) {
|
if ($enableDebugMode && ($debugModeWhitelist === [] || in_array($ip, $debugModeWhitelist))) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue