Code quality
This commit is contained in:
parent
7d82c82fd9
commit
b21efd8336
1 changed files with 3 additions and 3 deletions
|
@ -62,11 +62,11 @@ class TrafficLimiter extends AbstractPersistence
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* set a list of ip(ranges) as array
|
* set a list of ip(ranges) as string
|
||||||
*
|
*
|
||||||
* @access public
|
* @access public
|
||||||
* @static
|
* @static
|
||||||
* @param array $exemptedIps
|
* @param string $exemptedIps
|
||||||
*/
|
*/
|
||||||
public static function setExemptedIp($exemptedIp)
|
public static function setExemptedIp($exemptedIp)
|
||||||
{
|
{
|
||||||
|
@ -139,7 +139,7 @@ class TrafficLimiter extends AbstractPersistence
|
||||||
// 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 {
|
||||||
$contained = $address->matches($range);
|
$contained = $address->matches($range);
|
||||||
} catch (Exception $e) {
|
} catch (\Exception $e) {
|
||||||
// If something is wrong with matching the ip, we set $contained to false
|
// If something is wrong with matching the ip, we set $contained to false
|
||||||
$contained = false;
|
$contained = false;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue