mirror of
https://github.com/getgrav/grav.git
synced 2026-03-24 05:20:10 +01:00
fixes #2507
This commit is contained in:
@@ -9,6 +9,7 @@
|
||||
1. [](#bugfix)
|
||||
* Force question to install demo content in theme update [#2493](https://github.com/getgrav/grav/issues/2493)
|
||||
* Fixed GPM errors from blueprints not being logged [#2505](https://github.com/getgrav/grav/issues/2505)
|
||||
* Don't error when IP is invalid [#2507](https://github.com/getgrav/grav/issues/2507)
|
||||
|
||||
# v1.6.9
|
||||
## 05/09/2019
|
||||
|
||||
@@ -1494,12 +1494,11 @@ abstract class Utils
|
||||
* @param int $prefix
|
||||
*
|
||||
* @return string
|
||||
* @throws \InvalidArgumentException if provided an invalid IP
|
||||
*/
|
||||
public static function getSubnet($ip, $prefix = 64)
|
||||
{
|
||||
if (!filter_var($ip, FILTER_VALIDATE_IP)) {
|
||||
throw new \InvalidArgumentException('Invalid IP: ' . $ip);
|
||||
return $ip;
|
||||
}
|
||||
|
||||
// Packed representation of IP
|
||||
|
||||
Reference in New Issue
Block a user