Changeset View
Changeset View
Standalone View
Standalone View
src/ip/PhutilIPv6Address.php
Context not available. | |||||
} | } | ||||
protected static function newFromString($str) { | protected static function newFromString($str) { | ||||
$parts = explode(':', $str); | $parts = @explode(':', $str); | ||||
if (count($parts) > 8) { | if (count($parts) > 8) { | ||||
throw new Exception( | throw new Exception( | ||||
pht( | pht( | ||||
Context not available. | |||||
continue; | continue; | ||||
} | } | ||||
if (!preg_match('/^[0-9a-fA-F]{1,4}\z/', $part)) { | if (!@preg_match('/^[0-9a-fA-F]{1,4}\z/', $part)) { | ||||
throw new Exception( | throw new Exception( | ||||
pht( | pht( | ||||
'IP address "%s" is not properly formatted: the segments of '. | 'IP address "%s" is not properly formatted: the segments of '. | ||||
Context not available. |
Content licensed under Creative Commons Attribution-ShareAlike 4.0 (CC-BY-SA) unless otherwise noted; code licensed under Apache 2.0 or other open source licenses. · CC BY-SA 4.0 · Apache 2.0