]> git.mxchange.org Git - friendica.git/blobdiff - src/Util/Network.php
spelling: one
[friendica.git] / src / Util / Network.php
index f9f32d42229fcf88392202960adbb26e84a10059..e02767be4a950acc7c8c646443ce1f4531cfc9fc 100644 (file)
@@ -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;
                }