From 353532755d65f0af18dcae3cdcdcf194c974b408 Mon Sep 17 00:00:00 2001 From: Synchro Date: Thu, 6 Nov 2014 13:34:36 +0100 Subject: [PATCH] Avoid Debugoutput clash with built-in function names, fixes #308 --- class.smtp.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/class.smtp.php b/class.smtp.php index 2c5b8d300..2e6003131 100644 --- a/class.smtp.php +++ b/class.smtp.php @@ -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; }