Index: branches/5.2.x/core/kernel/utility/email_send.php =================================================================== diff -u -N -r14092 -r14095 --- branches/5.2.x/core/kernel/utility/email_send.php (.../email_send.php) (revision 14092) +++ branches/5.2.x/core/kernel/utility/email_send.php (.../email_send.php) (revision 14095) @@ -1,6 +1,6 @@ guessOptions = Array ( @@ -976,7 +976,7 @@ $message_headers = $this->GetPartHeaders($part_number); // join message headers and body headers - $message_headers = array_merge_recursive2($this->headers, $message_headers); + $message_headers = array_merge($this->headers, $message_headers); $message_headers['MIME-Version'] = '1.0'; if ($this->mailerName) { @@ -1090,11 +1090,18 @@ $params = Array (); } - if ( $this->Application->isDebugMode() ) { - $this->Application->Debugger->appendTrace(); + $error_msg = 'mail error: ' . vsprintf($error_msgs[$code], $params); + + if ($fatal) { + throw new Exception($error_msg); } + else { + if ( $this->Application->isDebugMode() ) { + $this->Application->Debugger->appendTrace(); + } - trigger_error('mail error: '.vsprintf($error_msgs[$code], $params), $fatal ? E_USER_ERROR : E_USER_WARNING); + trigger_error($error_msg, E_USER_WARNING); + } return false; } @@ -1167,7 +1174,7 @@ } if ($return_path) { - if (constOn('SAFE_MODE') || (defined('PHP_OS') && substr(PHP_OS, 0, 3) == 'WIN')) { + if (kUtil::constOn('SAFE_MODE') || (defined('PHP_OS') && substr(PHP_OS, 0, 3) == 'WIN')) { // safe mode restriction OR is windows $return_path = ''; }