]> git.koha-community.org Git - koha.git/commit
Bug 24350: Fix Branches.pickup_locations
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Mon, 6 Jan 2020 21:10:16 +0000 (22:10 +0100)
committerMartin Renvoize <martin.renvoize@ptfs-europe.com>
Tue, 7 Jan 2020 17:01:38 +0000 (17:01 +0000)
commitba892d39d2e197cc9fad942ac5202d0706ef505f
tree1ad8aef213f2485dc3c645734e57e259a9bb35ef
parentb8c0a387c858c011d193f1023b75285a05dc0383
Bug 24350: Fix Branches.pickup_locations

This will fix the following error:
Template process failed: undef error - Not a HASH reference at
/home/vagrant/kohaclone/Koha/Template/Plugin/Branches.pm line 96.
 at /home/vagrant/kohaclone/C4/Templates.pm line 122

Koha::Libraries->pickup_locations does not always return an array, but
arrayref if $biblio is not a Koha::Biblio object.

I do not think it's the correct fix, the pattern in
Koha::Libraries->pickup_locations is wrong: we should not expect 2
different types for a given parameter, biblio should always be a
Koha::Biblio (idem for item btw).
That could be fixed easily if the template had the Koha::Biblio object
sent.

Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Koha/Template/Plugin/Branches.pm