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.
*** This bug has been marked as a duplicate of bug 29807 ***
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.