You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spamassassin.apache.org by gb...@apache.org on 2020/04/21 09:20:23 UTC
svn commit: r1876780 - in /spamassassin:
branches/3.4/lib/Mail/SpamAssassin/PerMsgStatus.pm
trunk/lib/Mail/SpamAssassin/PerMsgStatus.pm
Author: gbechis
Date: Tue Apr 21 09:20:23 2020
New Revision: 1876780
URL: http://svn.apache.org/viewvc?rev=1876780&view=rev
Log:
silence a possible warning
Modified:
spamassassin/branches/3.4/lib/Mail/SpamAssassin/PerMsgStatus.pm
spamassassin/trunk/lib/Mail/SpamAssassin/PerMsgStatus.pm
Modified: spamassassin/branches/3.4/lib/Mail/SpamAssassin/PerMsgStatus.pm
URL: http://svn.apache.org/viewvc/spamassassin/branches/3.4/lib/Mail/SpamAssassin/PerMsgStatus.pm?rev=1876780&r1=1876779&r2=1876780&view=diff
==============================================================================
--- spamassassin/branches/3.4/lib/Mail/SpamAssassin/PerMsgStatus.pm (original)
+++ spamassassin/branches/3.4/lib/Mail/SpamAssassin/PerMsgStatus.pm Tue Apr 21 09:20:23 2020
@@ -1102,13 +1102,13 @@ sub rewrite_report_safe {
if (defined $self->{conf}->{rewrite_header}->{Subject}) {
# Add a prefix to the subject if needed
+ $subject = "\n" if !defined $subject;
if((defined $self->{subjprefix}) and ($self->{subjprefix} ne "")) {
$tag = $self->_replace_tags($self->{subjprefix});
$tag =~ s/\n/ /gs;
$subject = $tag . $subject;
}
# Add a **SPAM** prefix
- $subject = "\n" if !defined $subject;
$tag = $self->_replace_tags($self->{conf}->{rewrite_header}->{Subject});
$tag =~ s/\n/ /gs; # strip tag's newlines
$subject =~ s/^(?:\Q${tag}\E )?/${tag} /g; # For some reason the tag may already be there!?
Modified: spamassassin/trunk/lib/Mail/SpamAssassin/PerMsgStatus.pm
URL: http://svn.apache.org/viewvc/spamassassin/trunk/lib/Mail/SpamAssassin/PerMsgStatus.pm?rev=1876780&r1=1876779&r2=1876780&view=diff
==============================================================================
--- spamassassin/trunk/lib/Mail/SpamAssassin/PerMsgStatus.pm (original)
+++ spamassassin/trunk/lib/Mail/SpamAssassin/PerMsgStatus.pm Tue Apr 21 09:20:23 2020
@@ -1137,13 +1137,13 @@ sub rewrite_report_safe {
if (defined $self->{conf}->{rewrite_header}->{Subject}) {
# Add a prefix to the subject if needed
+ $subject = "\n" if !defined $subject;
if((defined $self->{subjprefix}) and ($self->{subjprefix} ne "")) {
$tag = $self->_replace_tags($self->{subjprefix});
$tag =~ s/\n/ /gs;
$subject = $tag . $subject;
}
# Add a **SPAM** prefix
- $subject = "\n" if !defined $subject;
$tag = $self->_replace_tags($self->{conf}->{rewrite_header}->{Subject});
$tag =~ s/\n/ /gs; # strip tag's newlines
$subject =~ s/^(?:\Q${tag}\E )?/${tag} /g; # For some reason the tag may already be there!?