Klemen - 2012-11-01 13:10:12
Hello,
First of all great class, have been using it for years now!
I think I came across a small error in the code so I thought I would share it.
** Description **
If you set Debug mode to off the class will still output "Starting TLS cryptograpic protocol" and "TLS started" debug messages when establishing a TLS connection.
** Code **
Line 1254:
$this->OutputDebug('Starting TLS cryptograpic protocol');
Line 1259:
$this->OutputDebug('TLS started');
** How to fix **
Add this code before the above two lines:
if($this->debug)
** Alternative fix **
To avoid repeating if($this->debug) throughout the script perhaps it would be better to remove all those lines and just change function OutputDebug to this:
Hello,
First of all great class, have been using it for years now!
I think I came across a small error in the code so I thought I would share it.
** Description **
If you set Debug mode to off the class will still output "Starting TLS cryptograpic protocol" and "TLS started" debug messages when establishing a TLS connection.
** Code **
Line 1254:
$this->OutputDebug('Starting TLS cryptograpic protocol');
Line 1259:
$this->OutputDebug('TLS started');
** How to fix **
Add this code before the above two lines:
if($this->debug)
** Alternative fix **
To avoid repeating if($this->debug) throughout the script perhaps it would be better to remove all those lines and just change function OutputDebug to this:
Function OutputDebug($message)
{
if($this->debug)
{
$message.="\n";
if($this->html_debug)
$message=str_replace("\n","<br />\n",HtmlEntities($message));
echo $message;
flush();
}
}
Thanks for all the valuable classes!
Sincerely,
Klemen