[Bps-public-commit] r14779 - RT-Extension-ExtractCustomFieldValues/lib/RT/Action

sunnavy at bestpractical.com sunnavy at bestpractical.com
Mon Aug 4 22:19:51 EDT 2008


Author: sunnavy
Date: Mon Aug  4 22:19:51 2008
New Revision: 14779

Modified:
   RT-Extension-ExtractCustomFieldValues/lib/RT/Action/ExtractCustomFieldValues.pm

Log:
fixed warnings

Modified: RT-Extension-ExtractCustomFieldValues/lib/RT/Action/ExtractCustomFieldValues.pm
==============================================================================
--- RT-Extension-ExtractCustomFieldValues/lib/RT/Action/ExtractCustomFieldValues.pm	(original)
+++ RT-Extension-ExtractCustomFieldValues/lib/RT/Action/ExtractCustomFieldValues.pm	Mon Aug  4 22:19:51 2008
@@ -96,8 +96,10 @@
     my $match = '';
     if ($args{Field} =~ /^body$/i) {
         $RT::Logger->debug("look for match in Body");
-        if ($args{FirstAttachment}->Content =~ /$args{Match}/m) {
-            $match = $1||$&;
+        if (   $args{FirstAttachment}->Content
+            && $args{FirstAttachment}->Content =~ /$args{Match}/m )
+        {
+            $match = $1 || $&;
             $RT::Logger->debug("matched value: $match");
         }
     } else {



More information about the Bps-public-commit mailing list