From 8406bd4c9fbc4fa5d72557386c5a1c3431d2c033 Mon Sep 17 00:00:00 2001 From: the-djmaze <3752035+the-djmaze@users.noreply.github.com> Date: Fri, 28 Oct 2022 19:10:17 +0200 Subject: [PATCH] Update Http.php Cleanup a bit --- snappymail/v/0.0.0/app/libraries/MailSo/Base/Http.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/snappymail/v/0.0.0/app/libraries/MailSo/Base/Http.php b/snappymail/v/0.0.0/app/libraries/MailSo/Base/Http.php index 1e5973b40..16ee13cfe 100644 --- a/snappymail/v/0.0.0/app/libraries/MailSo/Base/Http.php +++ b/snappymail/v/0.0.0/app/libraries/MailSo/Base/Http.php @@ -129,7 +129,7 @@ class Http public function GetHost(bool $bWithRemoteUserData = false, bool $bWithoutWWW = true, bool $bWithoutPort = false) : string { $sHost = $this->GetServer('HTTP_HOST', ''); - if (0 === \strlen($sHost)) + if (!\strlen($sHost)) { $sName = $this->GetServer('SERVER_NAME'); $iPort = (int) $this->GetServer('SERVER_PORT', 80); @@ -150,7 +150,7 @@ class Http if ($bWithoutPort) { - $sHost = \preg_replace('/:[\d]+$/', '', $sHost); + $sHost = \preg_replace('/:\d+$/', '', $sHost); } return $sHost;