check for path parts

This commit is contained in:
Art4 2024-11-18 14:33:26 +00:00
parent ae52648950
commit b612180c22

View file

@ -565,8 +565,9 @@ class Probe
$nick = '';
$addr = '';
$path_parts = explode('/', trim($parts['path'] ?? '', '/'));
if (is_array($path_parts)) {
if (array_key_exists('path', $parts) && strval($parts['path']) !== '') {
$path_parts = explode('/', trim($parts['path'], '/'));
$nick = ltrim(end($path_parts), '@');
$addr = $nick . '@' . $host;
}