https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28871
--- Comment #19 from Tomás Cohen Arazi <[email protected]> --- (In reply to Marcel de Rooy from comment #18) > In other words, please show me a better example where it does not work now > in list context. This sub: sub items_fetch { return Koha::Items->search(...); } will respect list context and do the appropriate thing i.e. my @items = items_fetch(); will perform the DB query, and have @items be assigned a list of Koha::Item objects. As ->empty is expected to be returned sometimes, and (why not) chained with other queries, it needs to behave the same as ->search. This is the ->empty counterpart of what I raised on bug 28883. Look at t/db_dependendent/Koha/Biblio.t:419 the addition of ->as_list there, is a consequence of the possibility Koha::Libraries->new->empty is returned in some scenarios. So Koha::Biblio->pickup_locations can honour list context sometimes, and sometimes not. With this patch the programmer can be sure ->pickup_locations has a predictable behavior and avoid coding for exceptional cases. -- You are receiving this mail because: 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/
