You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spamassassin.apache.org by jm...@apache.org on 2006/05/16 19:36:45 UTC

svn commit: r407002 - /spamassassin/trunk/lib/Mail/SpamAssassin/Message.pm

Author: jm
Date: Tue May 16 10:36:45 2006
New Revision: 407002

URL: http://svn.apache.org/viewcvs?rev=407002&view=rev
Log:
trivial fix: inhibit 'undefined value' warnings

Modified:
    spamassassin/trunk/lib/Mail/SpamAssassin/Message.pm

Modified: spamassassin/trunk/lib/Mail/SpamAssassin/Message.pm
URL: http://svn.apache.org/viewcvs/spamassassin/trunk/lib/Mail/SpamAssassin/Message.pm?rev=407002&r1=407001&r2=407002&view=diff
==============================================================================
--- spamassassin/trunk/lib/Mail/SpamAssassin/Message.pm (original)
+++ spamassassin/trunk/lib/Mail/SpamAssassin/Message.pm Tue May 16 10:36:45 2006
@@ -145,7 +145,9 @@
   }
 
   # Pull off mbox and mbx separators
-  if ( $message[0] =~ /^From\s/ ) {
+  if (!defined $message[0]) {
+    # no separator, there's no message ;)
+  } elsif ($message[0] =~ /^From\s/) {
     # mbox formated mailbox
     $self->{'mbox_sep'} = shift @message;
   } elsif ($message[0] =~ MBX_SEPARATOR) {



Re: svn commit: r407002 - /spamassassin/trunk/lib/Mail/SpamAssassin/Message.pm

Posted by Theo Van Dinter <fe...@apache.org>.
On Tue, May 16, 2006 at 06:55:12PM +0100, Justin Mason wrote:
> > When can this happen, now that the "null message causes undefined value
> > warnings" bug (4884) was fixed?  @message should always have at least
> > 1 entry in it now.
> 
> "make test" in b3_1_0, before this checkin, produced several
> warnings on every script for me....

Interesting!  Apparently the fix for 4884 works in 3.2 for some reason, but
not in 3.1.  Ok, I'm merging both of our patches into one.  <grumble>

-- 
Randomly Generated Tagline:
"Fishing is like magic that can kill you."
         - Dave Attell, Insomniac "Miami"

Re: svn commit: r407002 - /spamassassin/trunk/lib/Mail/SpamAssassin/Message.pm

Posted by Theo Van Dinter <fe...@apache.org>.
On Tue, May 16, 2006 at 05:36:45PM -0000, jm@apache.org wrote:
> trivial fix: inhibit 'undefined value' warnings
> 
> --- spamassassin/trunk/lib/Mail/SpamAssassin/Message.pm (original)
> +++ spamassassin/trunk/lib/Mail/SpamAssassin/Message.pm Tue May 16 10:36:45 2006
> @@ -145,7 +145,9 @@
>    }
>  
>    # Pull off mbox and mbx separators
> -  if ( $message[0] =~ /^From\s/ ) {
> +  if (!defined $message[0]) {
> +    # no separator, there's no message ;)
> +  } elsif ($message[0] =~ /^From\s/) {
>      # mbox formated mailbox
>      $self->{'mbox_sep'} = shift @message;
>    } elsif ($message[0] =~ MBX_SEPARATOR) {
> 

When can this happen, now that the "null message causes undefined value
warnings" bug (4884) was fixed?  @message should always have at least
1 entry in it now.

-- 
Randomly Generated Tagline:
"Remember that the next time when you're using virgin RAM, as opposed
 to RAM that's been touched." - Pat Beirnes