From 10a8be79430c5b3550fa6097171d9663320208f8 Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Sat, 10 Nov 2018 08:22:47 -0500 Subject: [PATCH] Accept URLs with no trailing slash in Probe::uri --- src/Network/Probe.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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); -- 2.39.5