[Koha-bugs] [Bug 21293] Display of housebound delivery information broken by Bug 13618

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Fri Sep 14 11:34:37 CEST 2018


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21293

--- Comment #7 from Marcel de Rooy <m.de.rooy at rijksmuseum.nl> ---
Some testing told me:

A construction with an assignment and a filter may be dangerous.
Like this one:
[% test = housebound_profile.housebound_visits | html  %]
housebound_profile is an object; visits is the returned arrayref.
Somehow, the html filter in TT makes that template var test becomes the string
ARRAY(..) instead of an array.

In the second patch we remove the filter from
[% hpd = housebound_profile.day | html %]
This is less problematic, since day is a string already.

Lesson:
All occurrences of [% var = something | html %] are error prone. If something
is not a string, but an object, array, hash etc., we are in trouble.
This probably needs more attention since we are passing objects to templates in
more scripts.

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list