summaryrefslogtreecommitdiffstats
path: root/extensions
diff options
context:
space:
mode:
Diffstat (limited to 'extensions')
-rw-r--r--extensions/BMO/Extension.pm5
1 files changed, 3 insertions, 2 deletions
diff --git a/extensions/BMO/Extension.pm b/extensions/BMO/Extension.pm
index e40e4eb15..8cd722547 100644
--- a/extensions/BMO/Extension.pm
+++ b/extensions/BMO/Extension.pm
@@ -40,7 +40,7 @@ use Bugzilla::Util;
use Scalar::Util qw(blessed);
use Date::Parse;
use DateTime;
-use Encode qw(find_encoding decode_utf8);
+use Encode qw(find_encoding encode_utf8);
use Sys::Syslog qw(:DEFAULT setlogsock);
use Bugzilla::Extension::BMO::Constants;
@@ -936,12 +936,13 @@ sub _log_sent_email {
} else {
$message_type = $email->header('X-Bugzilla-Watch-Reason');
}
+ $message_type =~ s/^(\S+)\s.+$/$1/;
$message_type ||= '?';
$subject =~ s/[\[\(]Bug \d+[\]\)]\s*//;
openlog('apache', 'cons,pid', 'local4');
- syslog('notice', decode_utf8("[bugmail] $recipient ($message_type) $bug_id $subject"));
+ syslog('notice', encode_utf8("[bugmail] $recipient ($message_type) $bug_id $subject"));
closelog();
}