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 = ''; $nick = '';
$addr = ''; $addr = '';
$path_parts = explode('/', trim($parts['path'] ?? '', '/')); if (array_key_exists('path', $parts) && strval($parts['path']) !== '') {
if (is_array($path_parts)) { $path_parts = explode('/', trim($parts['path'], '/'));
$nick = ltrim(end($path_parts), '@'); $nick = ltrim(end($path_parts), '@');
$addr = $nick . '@' . $host; $addr = $nick . '@' . $host;
} }