[Rt-commit] rt branch, new-style-templates, updated. rt-3.8.8-187-ga020779
Shawn Moore
sartak at bestpractical.com
Tue Jul 20 23:59:27 EDT 2010
The branch, new-style-templates has been updated
via a020779c0e90887f300f2a696ca79cd699f6cd35 (commit)
from d54050dc424c799366bb4a179f83601ee35e1c90 (commit)
Summary of changes:
lib/RT/Template_Overlay.pm | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
- Log -----------------------------------------------------------------
commit a020779c0e90887f300f2a696ca79cd699f6cd35
Author: Shawn M Moore <sartak at bestpractical.com>
Date: Wed Jul 21 00:01:05 2010 -0400
Check that obj can do method before blindly calling it
diff --git a/lib/RT/Template_Overlay.pm b/lib/RT/Template_Overlay.pm
index f80ac8d..301b066 100755
--- a/lib/RT/Template_Overlay.pm
+++ b/lib/RT/Template_Overlay.pm
@@ -494,7 +494,7 @@ sub _ParseContentSimple {
# XXX: this should be locked down otherwise you could say
# $TicketObj->Steal or something similarly ugly
elsif (my ($obj, $method) = $fi_text =~ /^\$(\w+)->(\w+)$/) {
- if (exists $args{TemplateArgs}{$obj}) {
+ if (exists $args{TemplateArgs}{$obj} && $args{TemplateArgs}{$obj}->can($method)) {
$fi_res = $args{TemplateArgs}{$obj}->$method;
$interpolated = 1;
}
-----------------------------------------------------------------------
More information about the Rt-commit
mailing list