@@ -69,21 +69,21 @@ |
||
69 | 69 | * @return boolean |
70 | 70 | */ |
71 | 71 | private function matchHostPart($value, &$hostname, &$address) { |
72 | - $matches = []; |
|
73 | - $pattern = '~^(\[(IPv[64])?(?P<addr1>[a-f\d\.\:]+)\])?\s*(?P<name>[a-z0-9\-\=]+\.[a-z0-9\-\.]+)?\s*(\[(IPv[64])?(?P<addr2>[a-f\d\.\:]+)\])?$~i'; |
|
74 | - if (preg_match($pattern, $value, $matches)) { |
|
75 | - if (!empty($matches['name'])) { |
|
76 | - $hostname = $matches['name']; |
|
77 | - } |
|
78 | - if (!empty($matches['addr1'])) { |
|
79 | - $address = $matches['addr1']; |
|
80 | - } |
|
81 | - if (!empty($matches['addr2'])) { |
|
82 | - $address = $matches['addr2']; |
|
83 | - } |
|
84 | - return true; |
|
85 | - } |
|
86 | - return false; |
|
72 | + $matches = []; |
|
73 | + $pattern = '~^(\[(IPv[64])?(?P<addr1>[a-f\d\.\:]+)\])?\s*(?P<name>[a-z0-9\-\=]+\.[a-z0-9\-\.]+)?\s*(\[(IPv[64])?(?P<addr2>[a-f\d\.\:]+)\])?$~i'; |
|
74 | + if (preg_match($pattern, $value, $matches)) { |
|
75 | + if (!empty($matches['name'])) { |
|
76 | + $hostname = $matches['name']; |
|
77 | + } |
|
78 | + if (!empty($matches['addr1'])) { |
|
79 | + $address = $matches['addr1']; |
|
80 | + } |
|
81 | + if (!empty($matches['addr2'])) { |
|
82 | + $address = $matches['addr2']; |
|
83 | + } |
|
84 | + return true; |
|
85 | + } |
|
86 | + return false; |
|
87 | 87 | } |
88 | 88 | |
89 | 89 | /** |