diff options
author | Brook Schofield <schofield@terena.org> | 2015-05-26 14:05:29 +0200 |
---|---|---|
committer | Brook Schofield <schofield@terena.org> | 2015-05-26 14:05:29 +0200 |
commit | 7934ef3a1eb83ddfa74d26f4745a2f93528185fe (patch) | |
tree | b61889578d1d6148dca269fec983877ac58ca5f5 /lib/SimpleSAML/Utils | |
parent | 2a92b721c247a51b7484f6b4cbb5645c58dbf5b1 (diff) | |
download | simplesamlphp-7934ef3a1eb83ddfa74d26f4745a2f93528185fe.zip simplesamlphp-7934ef3a1eb83ddfa74d26f4745a2f93528185fe.tar.gz simplesamlphp-7934ef3a1eb83ddfa74d26f4745a2f93528185fe.tar.bz2 |
Silence inet_pton
inet_pton failure is captured later - silence so unit tests pass.
Diffstat (limited to 'lib/SimpleSAML/Utils')
-rw-r--r-- | lib/SimpleSAML/Utils/Net.php | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/SimpleSAML/Utils/Net.php b/lib/SimpleSAML/Utils/Net.php index 22082b7..4cf2c83 100644 --- a/lib/SimpleSAML/Utils/Net.php +++ b/lib/SimpleSAML/Utils/Net.php @@ -20,7 +20,7 @@ class Net * * @author Andreas Åkre Solberg, UNINETT AS <andreas.solberg@uninett.no> * @author Olav Morken, UNINETT AS <olav.morken@uninett.no> - * @author Brook Schofield, TERENA + * @author Brook Schofield, GÉANT * @author Jaime Perez, UNINETT AS <jaime.perez@uninett.no> */ static function ipCIDRcheck($cidr, $ip = null) @@ -38,11 +38,11 @@ class Net // Validate IPv6 with inet_pton, convert to hex with bin2hex // then store as a long with hexdec - $ip_pack = inet_pton($ip); - $net_pack = inet_pton($net); + $ip_pack = @inet_pton($ip); + $net_pack = @inet_pton($net); if ($ip_pack === false || $net_pack === false) { - // not valid IPv6 address (warning already issued) + // not valid IPv6 address (warning silenced) return false; } |