summaryrefslogtreecommitdiffstats
path: root/Bugzilla/Template.pm
diff options
context:
space:
mode:
Diffstat (limited to 'Bugzilla/Template.pm')
-rw-r--r--Bugzilla/Template.pm7
1 files changed, 7 insertions, 0 deletions
diff --git a/Bugzilla/Template.pm b/Bugzilla/Template.pm
index b83079861..6c3e2161a 100644
--- a/Bugzilla/Template.pm
+++ b/Bugzilla/Template.pm
@@ -121,6 +121,13 @@ $Template::Stash::LIST_OPS->{ containsany } =
return 0;
};
+# Allow us to still get the scalar if we use the list operation ".0" on it,
+# as we often do for defaults in query.cgi and other places.
+$Template::Stash::SCALAR_OPS->{ 0 } =
+ sub {
+ return $_[0];
+ };
+
# Add a "substr" method to the Template Toolkit's "scalar" object
# that returns a substring of a string.
$Template::Stash::SCALAR_OPS->{ substr } =