[Bug 27970] New: Koha::Template::Plugin::Branches->pickup_location is failing due to unexpected behavior of Koha::Libraries->new->empty
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27970 Bug ID: 27970 Summary: Koha::Template::Plugin::Branches->pickup_location is failing due to unexpected behavior of Koha::Libraries->new->empty Change sponsored?: --- Product: Koha Version: 20.05 Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Circulation Assignee: koha-bugs@lists.koha-community.org Reporter: andreas.jonsson@kreablo.se QA Contact: testopia@bugs.koha-community.org CC: gmcharlt@gmail.com, kyle.m.hall@gmail.com This test-script: #!/usr/bin/perl -w # use strict; use Koha::Libraries; use Data::Dumper; my @empty = map {$_->unblessed} Koha::Libraries->new->empty; print Dumper(\@empty); yields this output: $VAR1 = [ [] ]; In other words, we get an array with a reference to an empty array. This is unexpected in two different ways: * The array should contain hash references (whenever it contains anything). * The array should be empty. The problem is that this will cause Template::Plugin::Branches->pickup_location to crash in some circumstances. A workaround is to add something like this to the loop: next if is_arrayref($l); I'm guessing the actual error is in DBIx. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27970 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |tomascohen@gmail.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27970 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |DUPLICATE Status|NEW |RESOLVED --- Comment #1 from Tomás Cohen Arazi <tomascohen@gmail.com> --- *** This bug has been marked as a duplicate of bug 29807 *** -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27970 --- Comment #2 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Thanks for the report, Andreas, I'm sorry I didn't notice it earlier. Working on a fix based on your findings, on bug 29807. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org