From 9b7a216c53e7874a44cc7e28fc23ffa3ee5ad9d2 Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Fri, 26 Apr 2019 14:35:18 +0100 Subject: [PATCH] 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 Signed-off-by: Nick Clemens --- C4/Auth_with_ldap.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/C4/Auth_with_ldap.pm b/C4/Auth_with_ldap.pm index 589dbcc68f..6f3b9a3828 100644 --- a/C4/Auth_with_ldap.pm +++ b/C4/Auth_with_ldap.pm @@ -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; -- 2.39.5