Skip to content

Commit 87918a3

Browse files
committed
fix
1 parent d2138ad commit 87918a3

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/TrackingRules.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ public function __construct(WordPressSettings $settings)
1414
public function hasExcludedIp(): bool
1515
{
1616
$ip = $_SERVER['HTTP_X_FORWARDED_FOR'] ?? $_SERVER['REMOTE_ADDR'];
17+
18+
if (empty($ip)) return false;
19+
1720
$list = $this->settings->array(SettingName::EXCLUDED_IP_ADDRESSES);
1821

1922
return in_array($ip, $list);

0 commit comments

Comments
 (0)