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)); } /**