View | Details | Raw Unified | Return to bug 16009
Collapse All | Expand All

(-)a/C4/Members.pm (-1 / +1 lines)
Lines 435-441 sub GetMember { Link Here
435
    }
435
    }
436
    $debug && warn $select, " ",values %information;
436
    $debug && warn $select, " ",values %information;
437
    my $sth = $dbh->prepare("$select");
437
    my $sth = $dbh->prepare("$select");
438
    $sth->execute(map{$information{$_}} keys %information);
438
    $sth->execute(@values);
439
    my $data = $sth->fetchall_arrayref({});
439
    my $data = $sth->fetchall_arrayref({});
440
    #FIXME interface to this routine now allows generation of a result set
440
    #FIXME interface to this routine now allows generation of a result set
441
    #so whole array should be returned but bowhere in the current code expects this
441
    #so whole array should be returned but bowhere in the current code expects this
(-)a/t/db_dependent/Members.t (-2 / +9 lines)
Lines 17-23 Link Here
17
17
18
use Modern::Perl;
18
use Modern::Perl;
19
19
20
use Test::More tests => 56;
20
use Test::More tests => 58;
21
use Test::MockModule;
21
use Test::MockModule;
22
use Data::Dumper;
22
use Data::Dumper;
23
use C4::Context;
23
use C4::Context;
Lines 409-412 sub testAgeAccessors { Link Here
409
    $member->{dateofbirth} = $original_dateofbirth; #It is polite to revert made changes in the unit tests.
409
    $member->{dateofbirth} = $original_dateofbirth; #It is polite to revert made changes in the unit tests.
410
} #sub testAgeAccessors
410
} #sub testAgeAccessors
411
411
412
# regression test for bug 16009
413
my $patron;
414
eval {
415
    my $patron = GetMember(cardnumber => undef);
416
};
417
is($@, '', 'Bug 16009: GetMember(cardnumber => undef) works');
418
is($patron, undef, 'Bug 16009: GetMember(cardnumber => undef) returns undef');
419
412
1;
420
1;
413
- 

Return to bug 16009