Skip to content

Commit cd0fed5

Browse files
author
Till Brehm
committed
Cast smtp port to int
1 parent 3b58a80 commit cd0fed5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

interface/lib/classes/ispcmail.inc.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ public function setOption($key, $value) {
169169
$this->smtp_host = $value;
170170
break;
171171
case 'smtp_port':
172-
if(intval($value) > 0) $this->smtp_port = $value;
172+
if(intval($value) > 0) $this->smtp_port = intval($value);
173173
break;
174174
case 'smtp_user':
175175
$this->smtp_user = $value;
@@ -585,7 +585,7 @@ private function _encodeSubject($input, $charset = 'ISO-8859-1') {
585585
* @access private
586586
*/
587587
private function _smtp_login() {
588-
$this->_smtp_conn = fsockopen(($this->smtp_crypt == 'ssl' ? 'tls://' : '') . $this->smtp_host, $this->smtp_port, $errno, $errstr, 30);
588+
$this->_smtp_conn = fsockopen(($this->smtp_crypt == 'ssl' ? 'tls://' : '') . $this->smtp_host, (int)$this->smtp_port, $errno, $errstr, 30);
589589
if(empty($this->_smtp_conn)) return false;
590590
$response = fgets($this->_smtp_conn, 515);
591591

0 commit comments

Comments
 (0)