From 118e57e2c2cb795456d280d86723086a4363223a Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Tue, 15 Jul 2025 13:43:18 +0200 Subject: [PATCH] Bug 40380: Remove warnings from Patrons/Import.t - Use of uninitialized value $csvkeycol{"dateexpiry"} in array element Content-Type: text/plain; charset=utf-8 Use of uninitialized value $csvkeycol{"dateexpiry"} in array element at /kohadevbox/koha/Koha/Patrons/Import.pm line 310, <$handle_2> line 2. Use of uninitialized value $csvkeycol{"dateexpiry"} in array element at /kohadevbox/koha/Koha/Patrons/Import.pm line 310, <$handle_3> line 2. Use of uninitialized value $csvkeycol{"dateexpiry"} in array element at /kohadevbox/koha/Koha/Patrons/Import.pm line 310, <$handle_4> line 2. Use of uninitialized value $csvkeycol{"dateexpiry"} in array element at /kohadevbox/koha/Koha/Patrons/Import.pm line 310, <$fh> line 2. Signed-off-by: David Nind Signed-off-by: Marcel de Rooy --- Koha/Patrons/Import.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Koha/Patrons/Import.pm b/Koha/Patrons/Import.pm index 50c17e0153..fa3f05fc3c 100644 --- a/Koha/Patrons/Import.pm +++ b/Koha/Patrons/Import.pm @@ -307,7 +307,8 @@ LINE: while ( my $borrowerline = <$handle> ) { next if $col eq 'password' && !$overwrite_passwords; next if $col eq 'dateexpiry' && $update_dateexpiry; - $borrower{$col} = $member->{$col} if $col eq 'dateexpiry' && !$columns[ $csvkeycol{$col} ]; + $borrower{$col} = $member->{$col} + if $col eq 'dateexpiry' && ( !$csvkeycol{$col} || !$columns[ $csvkeycol{$col} ] ); unless ( exists( $csvkeycol{$col} ) || $defaults->{$col} ) { $borrower{$col} = $member->{$col} if ( $member->{$col} ); -- 2.39.5