summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorByron Jones <bjones@mozilla.com>2013-11-19 15:11:30 +0100
committerByron Jones <bjones@mozilla.com>2013-11-19 15:11:30 +0100
commitb3d21fc65e4e80363071c4ae0e3029338056561f (patch)
tree124a7b33bd5a1f0a9550d6e02ba352a9d3bc403d
parenta1ca30a6ae868e80d8af50f94638733b6b822958 (diff)
downloadbugzilla-b3d21fc65e4e80363071c4ae0e3029338056561f.tar.gz
bugzilla-b3d21fc65e4e80363071c4ae0e3029338056561f.tar.xz
Bug 939844: Don't cache template filters when arguments are supplied
-rw-r--r--Bugzilla/Template/Context.pm3
1 files changed, 2 insertions, 1 deletions
diff --git a/Bugzilla/Template/Context.pm b/Bugzilla/Template/Context.pm
index db1a3cf90..b3e3446f6 100644
--- a/Bugzilla/Template/Context.pm
+++ b/Bugzilla/Template/Context.pm
@@ -99,7 +99,8 @@ sub filter {
my ($self, $name, $args) = @_;
# If we pass an alias for the filter name, the filter code is cached
# instead of looking for it at each call.
- $self->SUPER::filter($name, $args, $name);
+ # If the filter has arguments, then we can't cache it.
+ $self->SUPER::filter($name, $args, $args ? undef : $name);
}
# We need a DESTROY sub for the same reason that Bugzilla::CGI does.