0
0
mirror of https://github.com/PHPMailer/PHPMailer.git synced 2024-09-20 10:02:14 +02:00

Rename tval param to something more readable

Ensure port and timeout are set as integers
This commit is contained in:
Synchro 2014-08-05 11:59:50 +02:00
parent ba5288126b
commit 9a4646e261

View File

@ -154,28 +154,28 @@ class POP3
* A connect, login, disconnect sequence
* appropriate for POP-before SMTP authorisation.
* @access public
* @param string $host
* @param integer|boolean $port
* @param integer|boolean $tval
* @param string $host The hostname to connect to
* @param integer|boolean $port The port number to connect to
* @param integer|boolean $timeout The timeout value
* @param string $username
* @param string $password
* @param integer $debug_level
* @return boolean
*/
public function authorise($host, $port = false, $tval = false, $username = '', $password = '', $debug_level = 0)
public function authorise($host, $port = false, $timeout = false, $username = '', $password = '', $debug_level = 0)
{
$this->host = $host;
// If no port value provided, use default
if ($port === false) {
$this->port = $this->POP3_PORT;
} else {
$this->port = $port;
$this->port = (integer)$port;
}
// If no timeout value provided, use default
if ($tval === false) {
if ($timeout === false) {
$this->tval = $this->POP3_TIMEOUT;
} else {
$this->tval = $tval;
$this->tval = (integer)$timeout;
}
$this->do_debug = $debug_level;
$this->username = $username;