Skip to content

Commit

Permalink
Avoid Debugoutput clash with built-in function names, fixes PHPMailer…
Browse files Browse the repository at this point in the history
  • Loading branch information
Synchro committed Nov 6, 2014
1 parent d6acd1c commit 3535327
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion class.smtp.php
Expand Up @@ -188,7 +188,8 @@ protected function edebug($str, $level = 0)
if ($level > $this->do_debug) {
return;
}
if (is_callable($this->Debugoutput)) {
//Avoid clash with built-in function names
if (!in_array($this->Debugoutput, array('error_log', 'html', 'echo')) and is_callable($this->Debugoutput)) {
call_user_func($this->Debugoutput, $str, $this->do_debug);
return;
}
Expand Down

0 comments on commit 3535327

Please sign in to comment.