Skip to content

Commit

Permalink
get rid of ip variable
Browse files Browse the repository at this point in the history
  • Loading branch information
danslo committed Feb 19, 2025
1 parent bd13a2e commit 62d8b41
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions Model/IP.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,7 @@ public function collectRequestIPs(): array
if (!isset($_SERVER[$header])) {
continue;
}
$ips = preg_split('/[\s,]+/', $_SERVER[$header]);
foreach ($ips as $ip) {
foreach (preg_split('/[\s,]+/', $_SERVER[$header]) as $ip) {
$ip = trim($ip);
if (empty($ip) || $this->isPrivateIP($ip)) {
continue;
Expand Down

0 comments on commit 62d8b41

Please sign in to comment.