From b88037b253c848a2a786c7cd3b28b3b75ce7d6c7 Mon Sep 17 00:00:00 2001 From: Urban Müller Date: Wed, 4 Apr 2012 15:32:25 +0000 Subject: force sending of mails in it::error if not displayable --- it.class | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'it.class') diff --git a/it.class b/it.class index 1be8f7c..8b81ba3 100644 --- a/it.class +++ b/it.class @@ -228,7 +228,7 @@ static function error($p = array(), $body = null, $to = null) # $body and $to de $body = it::replace(array('(pw|passw|password|secret)\] => .*' => '$1] => ********'), $body); } - it::mail(array('To' => $p['to'], 'Subject' => substr($p['title'], 0, 80), 'Body' => $body) + (($cc = $GLOBALS['it_defaultconfig']['error_cc']) ? array('Cc' => $cc) : array())); + it::mail(array('To' => $p['to'], 'Subject' => substr($p['title'], 0, 80), 'Body' => $body, 'Cc' => $GLOBALS['it_defaultconfig']['error_cc'], 'forcemail' => !it::is_devel())); } else if ($_SERVER['REMOTE_ADDR']) # toscreen mode: web echo "
" . htmlspecialchars($p['title'] . "\n" . rtrim($body), ENT_COMPAT, "iso-8859-1") . ""; # works with iso-8859-1 or utf-8, UTF8SAFE @@ -813,7 +813,7 @@ static function mail($p) { $headers = $p; unset($headers['forcemail'], $headers['Body']); - $mail = new it_mail($headers); + $mail = new it_mail(array_filter($headers)); $mail->add_body($p['Body']); return $mail->send($p); -- cgit v1.2.3