https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32472
Bug ID: 32472
Summary: The method Koha::Item->count is not covered by tests
Change sponsored?: ---
Product: Koha
Version: master
Hardware: All
OS: All
Status: NEW
Severity: enhancement
Priority: P5 - low
Component: Architecture, internals, and plumbing
Assignee: [email protected]
Reporter: [email protected]
QA Contact: [email protected]
This is only possible under 21.11 (before bug Bug 29844 - Remove uses of
wantarray in Koha::Objects) in templates where constructions like items.count
etc are used on passed objects.
Template Toolkit does evaluate these expressions in LIST context while we
probably expected scalar context as when chaining in Perl.
This particular crash comes from acqui/orderreceive.pl (and template):
[% IF ( order.items.count ) %]
In this case we should either use the Scalar plugin or - simply - use size here
from TT itself.
Note that this could be applied to master too since it is probably cheaper to
stay in TT than call Koha::Objects/DBI here.
--
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[email protected]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/