Bug 22461: (follow-up) Use `exists` not `defined`

Prior to this patch there is a regression in the LDAP replication
functionality such that clearing a field become impossible. This patch
restores that functionality.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
This commit is contained in:
Martin Renvoize 2019-04-26 14:35:18 +01:00 committed by Nick Clemens
parent 90f8eb626d
commit 9b7a216c53
1 changed files with 1 additions and 1 deletions

View File

@ -224,7 +224,7 @@ sub checkpw_ldap {
my @columns = Koha::Patrons->columns;
my $patron = Koha::Patron->new(
{
map { defined( $borrower{$_} ) ? ( $_ => $borrower{$_} ) : () } @columns
map { exists( $borrower{$_} ) ? ( $_ => $borrower{$_} ) : () } @columns
}
)->store;
die "Insert of new patron failed" unless $patron;