aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2021-08-07 11:50:50 +0200
committerMichał Górny <mgorny@gentoo.org>2021-08-07 11:54:07 +0200
commitb4a10ec7a4d354618813816bd253663c98831948 (patch)
tree2564d9eb2485fbb0c29b621f944d2f390e134f57 /Bugzilla
parentfix riscv for new bugs (diff)
downloadbugzilla-b4a10ec7a4d354618813816bd253663c98831948.tar.gz
bugzilla-b4a10ec7a4d354618813816bd253663c98831948.tar.bz2
bugzilla-b4a10ec7a4d354618813816bd253663c98831948.zip
Fix sending bug mail after perl upgradegentoo-5.0.6.12
Patch taken from Fedora's .src.rpm. Thanks to dilfridge for finding it. Bug: https://bugzilla.redhat.com/show_bug.cgi?id=1855962.
Diffstat (limited to 'Bugzilla')
-rw-r--r--Bugzilla/BugMail.pm8
1 files changed, 4 insertions, 4 deletions
diff --git a/Bugzilla/BugMail.pm b/Bugzilla/BugMail.pm
index 18795d735..2075a71e1 100644
--- a/Bugzilla/BugMail.pm
+++ b/Bugzilla/BugMail.pm
@@ -495,10 +495,10 @@ sub _generate_bugmail {
}
my $email = Bugzilla::MIME->new($msg_header);
- if (scalar(@parts) == 1) {
- $email->content_type_set($parts[0]->content_type);
- }
- else {
+
+ # If there's only one part, we don't need to set the overall content type
+ # because Email::MIME will automatically take it from that part (bug 1657496)
+ if (scalar(@parts) > 1) {
$email->content_type_set('multipart/alternative');
# Some mail clients need same encoding for each part, even empty ones.