Simplifiy the split
This commit is contained in:
parent
47808ab0e9
commit
695e3d8b61
1 changed files with 4 additions and 4 deletions
|
@ -475,10 +475,10 @@ class Network
|
||||||
$parts['host'] = idn_to_ascii($parts['host']);
|
$parts['host'] = idn_to_ascii($parts['host']);
|
||||||
$uri = self::unparseURL($parts);
|
$uri = self::unparseURL($parts);
|
||||||
} elseif (strstr($uri, '@')) {
|
} elseif (strstr($uri, '@')) {
|
||||||
$host = idn_to_ascii(substr($uri, strpos($uri, '@') + 1));
|
$parts = explode('@', $uri);
|
||||||
$nick = substr($uri, 0, strpos($uri, '@'));
|
if (count($parts) == 2) {
|
||||||
|
$uri = $parts[0] . '@' . idn_to_ascii($parts[1]);
|
||||||
$uri = $nick . '@' . $host;
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return $uri;
|
return $uri;
|
||||||
|
|
Loading…
Reference in a new issue