From bfd56b7f8512df9c488bbcc768754014e168aa8f 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 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. --- 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 50c17e0153f..fa3f05fc3ce 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.34.1