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/16 20:29:13 UTC

svn commit: r407018 - /spamassassin/branches/3.1/lib/Mail/SpamAssassin/Message.pm

Author: felicity
Date: Tue May 16 11:29:12 2006
New Revision: 407018

URL: http://svn.apache.org/viewcvs?rev=407018&view=rev
Log:
bug 4884: deal with the last commit and work around another (more common) issue about null messages

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=407018&r1=407017&r2=407018&view=diff
==============================================================================
--- spamassassin/branches/3.1/lib/Mail/SpamAssassin/Message.pm (original)
+++ spamassassin/branches/3.1/lib/Mail/SpamAssassin/Message.pm Tue May 16 11:29:12 2006
@@ -132,15 +132,14 @@
   elsif (defined $message) {
     @message = split ( /^/m, $message );
   }
-  else {
+
+  # Pull off mbox and mbx separators
+  # also deal with null messages
+  if (!@message) {
+    # bug 4884:
     # 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 (!defined $message[0]) {
-    # no separator, there's no message ;)
   } elsif ($message[0] =~ /^From\s/) {
     # mbox formated mailbox
     $self->{'mbox_sep'} = shift @message;