You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spamassassin.apache.org by fe...@apache.org on 2006/05/02 05:27:47 UTC
svn commit: r398785 -
/spamassassin/branches/3.1/lib/Mail/SpamAssassin/Message.pm
Author: felicity
Date: Mon May 1 20:27:44 2006
New Revision: 398785
URL: http://svn.apache.org/viewcvs?rev=398785&view=rev
Log:
bug 4884: if a null message is passed in, there are several variables which end up undefined causing warnings. fake an empty message if no input is given.
Modified:
spamassassin/branches/3.1/lib/Mail/SpamAssassin/Message.pm
Modified: spamassassin/branches/3.1/lib/Mail/SpamAssassin/Message.pm
URL: http://svn.apache.org/viewcvs/spamassassin/branches/3.1/lib/Mail/SpamAssassin/Message.pm?rev=398785&r1=398784&r2=398785&view=diff
==============================================================================
--- spamassassin/branches/3.1/lib/Mail/SpamAssassin/Message.pm (original)
+++ spamassassin/branches/3.1/lib/Mail/SpamAssassin/Message.pm Mon May 1 20:27:44 2006
@@ -129,11 +129,14 @@
@message = <$message>;
}
}
- else {
+ elsif (defined $message) {
@message = split ( /^/m, $message );
}
-
- return $self unless @message;
+ else {
+ # if we get here, it means that the input was null, so fake the message
+ # content as a single newline...
+ @message = ("\n");
+ }
# Pull off mbox and mbx separators
if ( $message[0] =~ /^From\s/ ) {