From: Byron Jones Date: Tue, 19 Nov 2013 13:51:18 +0000 (+0800) Subject: Bug 939844: Don't cache template filters when arguments are supplied X-Git-Tag: bugzilla-4.5.2~84 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=eda44f6e2d20e02c5637c4b899307c2316c6e27e;p=thirdparty%2Fbugzilla.git Bug 939844: Don't cache template filters when arguments are supplied r=LpSolit, a=glob --- diff --git a/Bugzilla/Template/Context.pm b/Bugzilla/Template/Context.pm index ce1718e0fb..1e75d1d6f1 100644 --- a/Bugzilla/Template/Context.pm +++ b/Bugzilla/Template/Context.pm @@ -88,7 +88,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.