@@ -, +, @@ least one return. will occur. this time, it should work. --- C4/Members.pm | 2 +- t/db_dependent/Members.t | 10 +++++++++- 2 files changed, 10 insertions(+), 2 deletions(-) --- a/C4/Members.pm +++ a/C4/Members.pm @@ -435,7 +435,7 @@ sub GetMember { } $debug && warn $select, " ",values %information; my $sth = $dbh->prepare("$select"); - $sth->execute(map{$information{$_}} keys %information); + $sth->execute(@values); my $data = $sth->fetchall_arrayref({}); #FIXME interface to this routine now allows generation of a result set #so whole array should be returned but bowhere in the current code expects this --- a/t/db_dependent/Members.t +++ a/t/db_dependent/Members.t @@ -17,7 +17,7 @@ use Modern::Perl; -use Test::More tests => 56; +use Test::More tests => 58; use Test::MockModule; use Data::Dumper; use C4::Context; @@ -409,4 +409,12 @@ sub testAgeAccessors { $member->{dateofbirth} = $original_dateofbirth; #It is polite to revert made changes in the unit tests. } #sub testAgeAccessors +# regression test for bug 16009 +my $patron; +eval { + my $patron = GetMember(cardnumber => undef); +}; +is($@, '', 'Bug 16009: GetMember(cardnumber => undef) works'); +is($patron, undef, 'Bug 16009: GetMember(cardnumber => undef) returns undef'); + 1; --