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: koha-bugs@lists.koha-community.org Reporter: m.de.rooy@rijksmuseum.nl QA Contact: testopia@bugs.koha-community.org 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.