Skip to content

Commit

Permalink
Merge pull request #97 from JarvusInnovations/develop
Browse files Browse the repository at this point in the history
Release: gatekeeper v2.4.1
  • Loading branch information
themightychris authored Sep 23, 2020
2 parents f0f696f + 7d62859 commit 55c351e
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions php-classes/Gatekeeper/Bans/Ban.php
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ public static function getActiveBansTable()
} else {
static::$_activeBans['patterns'][] = $Ban->IPPattern;
}
} elseif($Ban->KeyID) {
} elseif ($Ban->KeyID) {
static::$_activeBans['keys'][] = $Ban->KeyID;
}
}
Expand All @@ -143,8 +143,7 @@ public static function getIPPatternBanClosure($ipPattern)
}

try {
$closure = include IPPattern::getFilenameFromHash($ipPatternHash);
);
$closure = include(IPPattern::getFilenameFromHash($ipPatternHash));
} catch (\Exception $e) {
$closure = IPPattern::parse($ipPattern, $ipPatternHash);
}
Expand All @@ -162,7 +161,7 @@ public static function isIPAddressBanned($ip)
}

// check IP Patterns individually
foreach($activeBans['patterns'] as $ipPattern) {
foreach ($activeBans['patterns'] as $ipPattern) {
$matcher = static::getIPPatternBanClosure($ipPattern);
if (call_user_func($matcher, $ip) === true) {
return true;
Expand Down

0 comments on commit 55c351e

Please sign in to comment.