You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spamassassin.apache.org by qu...@apache.org on 2004/05/11 12:02:09 UTC

svn commit: rev 10592 - incubator/spamassassin/trunk/masses

Author: quinlan
Date: Tue May 11 03:02:07 2004
New Revision: 10592

Modified:
   incubator/spamassassin/trunk/masses/mass-check
Log:
fix annoying warning


Modified: incubator/spamassassin/trunk/masses/mass-check
==============================================================================
--- incubator/spamassassin/trunk/masses/mass-check	(original)
+++ incubator/spamassassin/trunk/masses/mass-check	Tue May 11 03:02:07 2004
@@ -371,7 +371,8 @@
 sub message_should_be_deencapped {
   my ($ma) = @_;
 
-  if (scalar @{$ma->{body_parts}} > 0) {
+  # not sure why this is undefined, but it is sometimes
+  if (defined $ma->{body_parts} && scalar @{$ma->{body_parts}} > 0) {
     my $firstpart = $ma->{body_parts}->[0];
     if (!$firstpart->{headers}->{'content-type'}
         || $firstpart->{headers}->{'content-type'} ne 'text/plain')

Re: svn commit: rev 10592 - incubator/spamassassin/trunk/masses

Posted by Theo Van Dinter <fe...@kluge.net>.
On Tue, May 11, 2004 at 10:02:09AM -0000, quinlan@apache.org wrote:
> +  # not sure why this is undefined, but it is sometimes
> +  if (defined $ma->{body_parts} && scalar @{$ma->{body_parts}} > 0) {

it doesn't exist for leaf nodes in the tree.  so none-mime messages
for instance...  fyi.

-- 
Randomly Generated Tagline:
"We may not have got everything right, but at least we knew the century
 was going to end."            - Douglas Adams