@@ -57,9 +57,11 @@ |
||
57 | 57 | try |
58 | 58 | { |
59 | 59 | $this->validateAddress($ipAddress); |
60 | - if (strpos($ipAddress, ':') !== false) // IPv6 address |
|
60 | + if (strpos($ipAddress, ':') !== false) { |
|
61 | + // IPv6 address |
|
61 | 62 | { |
62 | 63 | $hex = unpack('H*hex', inet_pton($ipAddress)); |
64 | + } |
|
63 | 65 | $ipAddress = substr(preg_replace('/([A-f0-9]{4})/', "$1:", $hex['hex']), 0, -1); |
64 | 66 | $ipAddress = strtoupper($ipAddress); |
65 | 67 | } |