From a6e89f656296766ffb90a884c41006870d04ff14 Mon Sep 17 00:00:00 2001 From: Peter Rotich <peter@osticket.com> Date: Mon, 30 Jul 2012 14:35:17 -0400 Subject: [PATCH] Cast auth --- include/class.email.php | 4 ++-- include/class.mailer.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/class.email.php b/include/class.email.php index 29c7ac06b..e6b10c389 100644 --- a/include/class.email.php +++ b/include/class.email.php @@ -132,7 +132,7 @@ class Email { $info = array ( 'host' => $this->ht['smtp_host'], 'port' => $this->ht['smtp_port'], - 'auth' => $this->ht['smtp_auth'], + 'auth' => (bool) $this->ht['smtp_auth'], 'username' => $this->ht['userid'], 'password' => Mcrypt::decrypt($this->ht['userpass'], SECRET_SALT) ); @@ -305,7 +305,7 @@ class Email { $smtp = mail::factory('smtp', array ('host' => $vars['smtp_host'], 'port' => $vars['smtp_port'], - 'auth' => $vars['smtp_auth']?true:false, + 'auth' => (bool) $vars['smtp_auth'], 'username' =>$vars['userid'], 'password' =>$passwd, 'timeout' =>20, diff --git a/include/class.mailer.php b/include/class.mailer.php index d2e10961a..a469d5528 100644 --- a/include/class.mailer.php +++ b/include/class.mailer.php @@ -139,7 +139,7 @@ class Mailer { $mail = mail::factory('smtp', array ('host' => $smtp['host'], 'port' => $smtp['port'], - 'auth' => $smtp['auth']?true:false, + 'auth' => $smtp['auth'], 'username' => $smtp['username'], 'password' => $smtp['password'], 'timeout' =>20, -- GitLab