X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FUtil%2FNetwork.php;h=e02767be4a950acc7c8c646443ce1f4531cfc9fc;hb=46cd39fb34613f4b331793f19c0e562f93125066;hp=f9f32d42229fcf88392202960adbb26e84a10059;hpb=24c32cff0dcd38d5aa509208f5f17abb05a8b140;p=friendica.git diff --git a/src/Util/Network.php b/src/Util/Network.php index f9f32d4222..e02767be4a 100644 --- a/src/Util/Network.php +++ b/src/Util/Network.php @@ -349,7 +349,7 @@ class Network $pair = $param . '=' . str_replace(' ', '+', $value); $url = str_replace($pair, '', $url); - // Third try: Maybey the url isn't encoded at all + // Third try: Maybe the url isn't encoded at all $pair = $param . '=' . $value; $url = str_replace($pair, '', $url); @@ -376,6 +376,7 @@ class Network */ public static function addBasePath(string $url, string $basepath): string { + $url = trim($url); if (!empty(parse_url($url, PHP_URL_SCHEME)) || empty(parse_url($basepath, PHP_URL_SCHEME)) || empty($url) || empty(parse_url($url))) { return $url; }