Bug 16009: fix GetMember() search on NULL/undef values
authorGalen Charlton <gmcharlt@gmail.com>
Wed, 9 Mar 2016 01:41:33 +0000 (01:41 +0000)
committerJulian Maurice <julian.maurice@biblibre.com>
Mon, 14 Mar 2016 09:12:29 +0000 (10:12 +0100)
commitb19659e3043e5999b178add460020592e9c5c00c
treecdd900e3237a354686948ad72ad2703848da29e1
parentdf034e819188e4767a705d5a74b44dd97dcb6e50
Bug 16009: fix GetMember() search on NULL/undef values

This patch fixes a bug whereby GetMember(searchfield => undef)
(i.e., searching for patron records where 'searchfield' is NULL)
would crash.

This fixes a regression introduced by bug 15344 that in turn
exposed a long-standing bug in GetMember().

To test:

[1] Import some offline circulation transactions that include at
    least one return.
[2] Attempt to view the list of pending transactions; a crash
    will occur.
[3] Apply the patch and view the list of pending transactions again;
    this time, it should work.

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
Signed-off-by: Srdjan <srdjan@catalyst.net.nz>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
C4/Members.pm
t/db_dependent/Members.t