From e24a6cd52d3ebc9fe836f035b904f6c4fe5243e2 Mon Sep 17 00:00:00 2001 From: Eldad Fux Date: Thu, 2 Jul 2020 20:58:24 +0300 Subject: [PATCH] Fixed get port method --- src/Appwrite/Utopia/Request.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Appwrite/Utopia/Request.php b/src/Appwrite/Utopia/Request.php index f6b0b6a697..9d582470f5 100644 --- a/src/Appwrite/Utopia/Request.php +++ b/src/Appwrite/Utopia/Request.php @@ -162,7 +162,7 @@ class Request extends UtopiaRequest */ public function getPort(): string { - return $this->getHeader('x-forwarded-port', \parse_url($this->getProtocol().'//'.$this->getHeader('x-forwarded-host', $this->getHeader('host')), PHP_URL_PORT)); + return $this->getHeader('x-forwarded-port', (string)\parse_url($this->getProtocol().'://'.$this->getHeader('x-forwarded-host', $this->getHeader('host')), PHP_URL_PORT)); } /**