diff options
Diffstat (limited to 'Bugzilla/Template.pm')
-rw-r--r-- | Bugzilla/Template.pm | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Bugzilla/Template.pm b/Bugzilla/Template.pm index fbddbb395..3141c8a4c 100644 --- a/Bugzilla/Template.pm +++ b/Bugzilla/Template.pm @@ -391,6 +391,13 @@ $Template::Stash::LIST_OPS->{ containsany } = return 0; }; +# Clone the array reference to leave the original one unaltered. +$Template::Stash::LIST_OPS->{ clone } = + sub { + my $list = shift; + return [@$list]; + }; + # 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 } = |