[Rt-commit] rt branch, 4.0/squash-empty-template-warning, created. rt-4.0.7-58-gda08f6f
Thomas Sibley
trs at bestpractical.com
Mon Sep 10 13:57:11 EDT 2012
The branch, 4.0/squash-empty-template-warning has been created
at da08f6fec529c76b12a6cae9c62cb857cafb6b99 (commit)
- Log -----------------------------------------------------------------
commit da08f6fec529c76b12a6cae9c62cb857cafb6b99
Author: Thomas Sibley <trs at bestpractical.com>
Date: Mon Sep 10 10:55:49 2012 -0700
Avoid "uninitialized" warnings when parsing empty templates
Empty templates are used to squash outgoing mail on a queue-by-queue
basis.
diff --git a/lib/RT/Template.pm b/lib/RT/Template.pm
index 117cc3f..bfcca53 100644
--- a/lib/RT/Template.pm
+++ b/lib/RT/Template.pm
@@ -335,7 +335,7 @@ sub Parse {
my ($rv, $msg);
- if ($self->Content =~ m{^Content-Type:\s+text/html\b}im) {
+ if (not $self->IsEmpty and $self->Content =~ m{^Content-Type:\s+text/html\b}im) {
local $RT::Transaction::PreferredContentType = 'text/html';
($rv, $msg) = $self->_Parse(@_);
}
-----------------------------------------------------------------------
More information about the Rt-commit
mailing list