Ensure consistency in port handling, always set as string and not as integer

This commit is contained in:
Flavio Copes
2016-01-19 11:38:06 +01:00
parent 9b1b69fcae
commit 09e1c844f4

View File

@@ -86,7 +86,7 @@ class Uri
*/
private function buildPort()
{
$port = isset($_SERVER['SERVER_PORT']) ? $_SERVER['SERVER_PORT'] : 80;
$port = isset($_SERVER['SERVER_PORT']) ? (string)$_SERVER['SERVER_PORT'] : '80';
return $port;
}