http://issues.apache.org/SpamAssassin/show_bug.cgi?id=5823

           Summary: warn: Use of uninitialized value in pattern match (m//)
                    at Rule2XSBody.pm line 244.
           Product: Spamassassin
           Version: SVN Trunk (Latest Devel Version)
          Platform: Other
        OS/Version: other
            Status: NEW
          Severity: normal
          Priority: P5
         Component: spamassassin
        AssignedTo: [email protected]
        ReportedBy: [EMAIL PROTECTED]


Running spamassassin on bug 5041 attachment 3655 with Rule2XSBody plugin
enabled, I get the warning in the summary.

Line 244 in Rule2XSBody.pm refers to a variable $flags that has bee set and then
used with

  $rulename =~ s/,\[(.*?)\]$//;
  my $flags = $1;
  [ ... ]
  if ($flags =~ /\bl=0/) {

Perl experts -- Is it the case that the above leaves $flags undefined if
$rulename does not end in ',[something]' and if so is the correct fix to make
the second line

  my $flags = $1 || '';

or to make the last line

  if (defined($flags) && ($flags =~ /\bl=0/)) {



------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

Reply via email to