From e86246a1b71f5b7d9aab28bc8ed65cc893341d2f Mon Sep 17 00:00:00 2001 From: Zach Borboa Date: Thu, 7 Jun 2018 03:12:07 -0700 Subject: [PATCH] Match order of unparsed url parts --- src/Curl/Url.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Curl/Url.php b/src/Curl/Url.php index 467fbaa..c0d3594 100644 --- a/src/Curl/Url.php +++ b/src/Curl/Url.php @@ -194,11 +194,11 @@ class Url */ private function unparseUrl($parsed_url) { $scheme = isset($parsed_url['scheme']) ? $parsed_url['scheme'] . '://' : ''; - $host = isset($parsed_url['host']) ? $parsed_url['host'] : ''; - $port = isset($parsed_url['port']) ? ':' . $parsed_url['port'] : ''; $user = isset($parsed_url['user']) ? $parsed_url['user'] : ''; $pass = isset($parsed_url['pass']) ? ':' . $parsed_url['pass'] : ''; $pass = ($user || $pass) ? $pass . '@' : ''; + $host = isset($parsed_url['host']) ? $parsed_url['host'] : ''; + $port = isset($parsed_url['port']) ? ':' . $parsed_url['port'] : ''; $path = isset($parsed_url['path']) ? $parsed_url['path'] : ''; $query = isset($parsed_url['query']) ? '?' . $parsed_url['query'] : ''; $fragment = isset($parsed_url['fragment']) ? '#' . $parsed_url['fragment'] : '';