be more precise

This commit is contained in:
El RIDO 2021-05-22 11:35:53 +02:00
parent b6460616ba
commit 7de12d64d5
No known key found for this signature in database
GPG Key ID: 0F5C940A6BD81F92
1 changed files with 2 additions and 2 deletions

View File

@ -126,11 +126,11 @@ class TrafficLimiter extends AbstractPersistence
$range = Factory::rangeFromString($ipRange); $range = Factory::rangeFromString($ipRange);
// address could not be parsed, we might not be in IP space and try a string comparison instead // address could not be parsed, we might not be in IP space and try a string comparison instead
if ($address == null) { if (is_null($address)) {
return $_SERVER[self::$_ipKey] === $ipRange; return $_SERVER[self::$_ipKey] === $ipRange;
} }
// range could not be parsed, possibly an invalid ip range given in config // range could not be parsed, possibly an invalid ip range given in config
if ($range == null) { if (is_null($range)) {
return false; return false;
} }