1 | 173,175c173,181 |
---|
2 | < |
---|
3 | < if ($url_parts['port'] !== 80) { |
---|
4 | < $out .= ':' . $url_parts['port']; |
---|
5 | --- |
---|
6 | > |
---|
7 | > if( !empty($url_parts['scheme']) && strtolower($url_parts['scheme']) === 'http' && $url_parts['port'] !== 80 ) { |
---|
8 | > $out .= ':' . $url_parts['port']; // Handle custom http scheme port |
---|
9 | > } |
---|
10 | > else if( !empty($url_parts['scheme']) && strtolower($url_parts['scheme']) === 'https' && $url_parts['port'] !== 443 ) { |
---|
11 | > $out .= ':' . $url_parts['port']; // Handle custom https scheme port |
---|
12 | > } |
---|
13 | > else if( empty($url_parts['scheme']) || strtolower($url_parts['scheme']) !== 'http' || strtolower( $url_parts['scheme']) !== 'https' ) { |
---|
14 | > $out .= ':' . $url_parts['port']; // specify port when scheme is unknown |
---|