From: Hypolite Petovan Date: Sat, 10 Nov 2018 13:22:47 +0000 (-0500) Subject: Accept URLs with no trailing slash in Probe::uri X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=10a8be79430c5b3550fa6097171d9663320208f8;p=friendica.git Accept URLs with no trailing slash in Probe::uri --- diff --git a/src/Network/Probe.php b/src/Network/Probe.php index d870e06f97..aa770b92ee 100644 --- a/src/Network/Probe.php +++ b/src/Network/Probe.php @@ -575,7 +575,7 @@ class Probe { $parts = parse_url($uri); - if (!empty($parts["scheme"]) && !empty($parts["host"]) && !empty($parts["path"])) { + if (!empty($parts["scheme"]) && !empty($parts["host"])) { $host = $parts["host"]; if (!empty($parts["port"])) { $host .= ':'.$parts["port"]; @@ -590,7 +590,7 @@ class Probe return []; } - $path_parts = explode("/", trim($parts["path"], "/")); + $path_parts = explode("/", trim(defaults($parts, 'path', ''), "/")); while (!$lrdd && (sizeof($path_parts) > 1)) { $host .= "/".array_shift($path_parts);