Skip to content

Commit

Permalink
Use always int to represent the port
Browse files Browse the repository at this point in the history
before it was string when result of parse_url() and a int when the
default was used.
  • Loading branch information
staabm committed Feb 16, 2016
1 parent 3c542de commit 586e212
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/Server.php
Expand Up @@ -660,7 +660,7 @@ private function initializeRequest(Client $client, array $parseResult): Internal
if (stripos($uri, "http://") === 0 || stripos($uri, "https://") === 0) {
extract(parse_url($uri), EXTR_PREFIX_ALL, "uri");
$ireq->uriHost = $uri_host;
$ireq->uriPort = $uri_port ?? 80;
$ireq->uriPort = isset($uri_port) ? (int)$uri_port : 80;
$ireq->uriPath = $uri_path;
$ireq->uriQuery = $uri_query ?? "";
$ireq->uri = isset($uri_query) ? "{$uri_path}?{$uri_query}" : $uri_path;
Expand Down

0 comments on commit 586e212

Please sign in to comment.