From cd0fed54688e565316e72046688211c32ec8c265 Mon Sep 17 00:00:00 2001 From: Till Brehm Date: Wed, 31 May 2023 07:32:28 +0000 Subject: [PATCH] Cast smtp port to int --- interface/lib/classes/ispcmail.inc.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/interface/lib/classes/ispcmail.inc.php b/interface/lib/classes/ispcmail.inc.php index f5aa359577..17ab0eb300 100644 --- a/interface/lib/classes/ispcmail.inc.php +++ b/interface/lib/classes/ispcmail.inc.php @@ -169,7 +169,7 @@ class ispcmail { $this->smtp_host = $value; break; case 'smtp_port': - if(intval($value) > 0) $this->smtp_port = $value; + if(intval($value) > 0) $this->smtp_port = intval($value); break; case 'smtp_user': $this->smtp_user = $value; @@ -585,7 +585,7 @@ class ispcmail { * @access private */ private function _smtp_login() { - $this->_smtp_conn = fsockopen(($this->smtp_crypt == 'ssl' ? 'tls://' : '') . $this->smtp_host, $this->smtp_port, $errno, $errstr, 30); + $this->_smtp_conn = fsockopen(($this->smtp_crypt == 'ssl' ? 'tls://' : '') . $this->smtp_host, (int)$this->smtp_port, $errno, $errstr, 30); if(empty($this->_smtp_conn)) return false; $response = fgets($this->_smtp_conn, 515); -- GitLab