Skip to content

Commit

Permalink
Rename tval param to something more readable
Browse files Browse the repository at this point in the history
Ensure port and timeout are set as integers
  • Loading branch information
Synchro committed Aug 5, 2014
1 parent ba52881 commit 9a4646e
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions class.pop3.php
Expand Up @@ -154,28 +154,28 @@ public static function popBeforeSmtp(
* 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;
Expand Down

0 comments on commit 9a4646e

Please sign in to comment.