[Rt-commit] rt branch, new-style-templates, updated. rt-3.8.8-222-ga9b7c1b
Shawn Moore
sartak at bestpractical.com
Mon Jul 26 20:58:28 EDT 2010
The branch, new-style-templates has been updated
via a9b7c1b950ce136a576eb6f60451e79c94edbc89 (commit)
from a6f22ed89acc2b54fb6c75771129e1e2c1e23821 (commit)
Summary of changes:
lib/RT/Template_Overlay.pm | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
- Log -----------------------------------------------------------------
commit a9b7c1b950ce136a576eb6f60451e79c94edbc89
Author: Shawn M Moore <sartak at bestpractical.com>
Date: Mon Jul 26 21:00:10 2010 -0400
Text::Template really dislikes SOURCE => undef
diff --git a/lib/RT/Template_Overlay.pm b/lib/RT/Template_Overlay.pm
index 4ffa706..57fa62c 100755
--- a/lib/RT/Template_Overlay.pm
+++ b/lib/RT/Template_Overlay.pm
@@ -651,9 +651,12 @@ sub CompileCheck {
return (1, $self->loc("Template does not include Perl code"))
unless $self->Type eq 'Full';
+ my $content = $self->Content;
+ $content = '' if !defined($content);
+
my $template = Text::Template->new(
TYPE => 'STRING',
- SOURCE => $self->Content,
+ SOURCE => $content,
);
$template->compile;
-----------------------------------------------------------------------
More information about the Rt-commit
mailing list