Bug 16877

Summary: GetBorrowercategoryList(): $sth->fetchall_arrayref( {} ) throws an error
Product: Koha Reporter: Srdjan Jankovic <srdjan>
Component: PatronsAssignee: Srdjan Jankovic <srdjan>
Status: RESOLVED DUPLICATE QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low CC: gmcharlt, jonathan.druart, katrin.fischer, kyle.m.hall, veron
Version: master   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Trivial patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Attachments: Bug 16877: Redo GetBorrowercategoryList() to use Koha::Patron::Categories->search()
Bug 16877: Redo GetBorrowercategoryList() to use Koha::Patron::Categories->search()

Description Srdjan Jankovic 2016-07-08 02:47:52 UTC
Despite the DBI docs, $sth->fetchall_arrayref( {} ) throws an error on xenial.
Simple {Slice => {}} would fix it. But let's take this as an opportunity to replace it with Koha::Patron::Categories->search().
Comment 1 Srdjan Jankovic 2016-07-08 02:51:06 UTC Comment hidden (obsolete)
Comment 2 Srdjan Jankovic 2016-07-08 02:52:55 UTC
To test:
* Check the "Category" list on eg Patron attribute type maint screens
Comment 3 Marc Véron 2016-07-08 06:38:05 UTC
Created attachment 53213 [details] [review]
Bug 16877: Redo GetBorrowercategoryList() to use Koha::Patron::Categories->search()

Followed plan from comment #2
* Check the "Category" list on eg Patron attribute type maint screens

prove t/db_dependent/Members.t: Same results with and without patch
(Test 1 fails, but not related to this patch)

Signed-off-by: Marc Véron <veron@veron.ch>
Comment 4 Marc Véron 2016-07-08 07:05:53 UTC
Note: Error with t/db_dependent/Members.t was due to a local problem.
Comment 5 Jonathan Druart 2016-07-08 14:55:22 UTC
Srdjan, I have removed this subroutine on bug 15407 which is waiting for QA.
I'd prefer to see it pushed and mark this one as a duplicate instead of rewriting a patch and rebasing the patchset.
Would you agree?
Comment 6 Srdjan Jankovic 2016-07-11 00:11:46 UTC
Totally. I should have looked at the bug list again when I decided not to go with the simple fix.
Comment 7 Katrin Fischer 2016-07-11 21:41:38 UTC

*** This bug has been marked as a duplicate of bug 15407 ***