[Rt-commit] r17346 - rt/3.8/trunk/lib/RT/Action
ruz at bestpractical.com
ruz at bestpractical.com
Wed Dec 24 23:38:35 EST 2008
Author: ruz
Date: Wed Dec 24 23:38:35 2008
New Revision: 17346
Modified:
rt/3.8/trunk/lib/RT/Action/SendEmail.pm
Log:
* subject can be undefined
* chomp first then replace newlines with spaces
Modified: rt/3.8/trunk/lib/RT/Action/SendEmail.pm
==============================================================================
--- rt/3.8/trunk/lib/RT/Action/SendEmail.pm (original)
+++ rt/3.8/trunk/lib/RT/Action/SendEmail.pm Wed Dec 24 23:38:35 2008
@@ -936,12 +936,13 @@
my $tmp = $first->GetHeader('Subject');
$subject = defined $tmp ? $tmp : $self->TicketObj->Subject;
} else {
- $subject = $self->TicketObj->Subject();
+ $subject = $self->TicketObj->Subject;
}
+ $subject = '' unless defined $subject;
+ chomp $subject;
- $subject =~ s/(\r\n|\n|\s)/ /gi;
+ $subject =~ s/(\r\n|\n|\s)/ /g;
- chomp $subject;
$self->SetHeader( 'Subject', $subject );
}
More information about the Rt-commit
mailing list