Optimized the canPass() functions
This commit is contained in:
parent
5812a6bb68
commit
af5a14afc3
1 changed files with 3 additions and 1 deletions
|
@ -122,7 +122,9 @@ class TrafficLimiter extends AbstractPersistence
|
||||||
$range = \IPLib\Factory::rangeFromString(trim($ipRange));
|
$range = \IPLib\Factory::rangeFromString(trim($ipRange));
|
||||||
|
|
||||||
// If $range is null something went wrong (possible invalid ip given in config). It's here becaue matches($range) does not accepts null vallue
|
// If $range is null something went wrong (possible invalid ip given in config). It's here becaue matches($range) does not accepts null vallue
|
||||||
if ($range == null) return false;
|
if ($range == null) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
// Ip-lib does throws and exception when something goes wrong, if so we want to catch it and set contained to false
|
// Ip-lib does throws and exception when something goes wrong, if so we want to catch it and set contained to false
|
||||||
try {
|
try {
|
||||||
|
|
Loading…
Reference in a new issue