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 d066daa commit d6acd1c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion class.phpmailer.php
Expand Up @@ -630,7 +630,8 @@ protected function edebug($str)
if ($this->SMTPDebug <= 0) {
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->SMTPDebug);
return;
}
Expand Down

0 comments on commit d6acd1c

Please sign in to comment.