From 7de12d64d532f9cc28c8122b9e553b257bd18b75 Mon Sep 17 00:00:00 2001 From: El RIDO Date: Sat, 22 May 2021 11:35:53 +0200 Subject: [PATCH] be more precise --- lib/Persistence/TrafficLimiter.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/Persistence/TrafficLimiter.php b/lib/Persistence/TrafficLimiter.php index b45dcf8..be76b8c 100644 --- a/lib/Persistence/TrafficLimiter.php +++ b/lib/Persistence/TrafficLimiter.php @@ -126,11 +126,11 @@ class TrafficLimiter extends AbstractPersistence $range = Factory::rangeFromString($ipRange); // 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; } // range could not be parsed, possibly an invalid ip range given in config - if ($range == null) { + if (is_null($range)) { return false; }