From: Hypolite Petovan Date: Thu, 8 Dec 2022 03:15:47 +0000 (-0500) Subject: Check for parts key existence before performing strpos in Network\Probe X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=0af2be14eec590ca55bec12b6e37beed588d0436;p=friendica.git Check for parts key existence before performing strpos in Network\Probe - Address part of https://github.com/friendica/friendica/issues/12011#issuecomment-1338133783 --- diff --git a/src/Network/Probe.php b/src/Network/Probe.php index e74b437345..87c28619dc 100644 --- a/src/Network/Probe.php +++ b/src/Network/Probe.php @@ -684,7 +684,7 @@ class Probe } $parts = parse_url($uri); - if (empty($parts['scheme']) && empty($parts['host']) && !strstr($parts['path'], '@')) { + if (empty($parts['scheme']) && empty($parts['host']) && (empty($parts['path']) || strpos($parts['path'], '@') === false)) { Logger::info('URI was not detectable', ['uri' => $uri]); return []; }