From 28cfd21fcfa3d65365e0ed128c9bac1b207cb412 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Tue, 15 Jul 2025 13:48:43 +0200 Subject: [PATCH] Bug 40380: Remove warnings from Patrons/Import.t - Argument "" isn't numeric in numeric eq (==) Using perl -MCarp::Always: Argument "" isn't numeric in numeric eq (==) at /usr/share/perl5/DBIx/Class/Row.pm line 1017, <$handle_1> line 2. DBIx::Class::Row::_eq_column_values(Koha::Schema::Result::Borrower=HASH(0x57c409b9ec08), "autorenew_checkouts", "", 1) called at /usr/share/perl5/DBIx/Class/Row.pm line 945 --- Koha/Patrons/Import.pm | 2 +- t/db_dependent/Koha/Patrons/Import.t | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Koha/Patrons/Import.pm b/Koha/Patrons/Import.pm index fa3f05fc3ce..f36495d76ac 100644 --- a/Koha/Patrons/Import.pm +++ b/Koha/Patrons/Import.pm @@ -268,7 +268,7 @@ LINE: while ( my $borrowerline = <$handle> ) { # Remove warning for int datatype that cannot be null # Argument "" isn't numeric in numeric eq (==) at /usr/share/perl5/DBIx/Class/Row.pm line 1018 for my $field ( - qw( privacy privacy_guarantor_fines privacy_guarantor_checkouts anonymized login_attempts checkprevcheckout) + qw( privacy privacy_guarantor_fines privacy_guarantor_checkouts anonymized login_attempts checkprevcheckout autorenew_checkouts ) ) { delete $borrower{$field} diff --git a/t/db_dependent/Koha/Patrons/Import.t b/t/db_dependent/Koha/Patrons/Import.t index 8949574a797..64e5f95a069 100755 --- a/t/db_dependent/Koha/Patrons/Import.t +++ b/t/db_dependent/Koha/Patrons/Import.t @@ -18,7 +18,8 @@ # along with Koha; if not, see . use Modern::Perl; -use Test::More tests => 180; +use Test::More tests => 181; +use Test::NoWarnings; use Test::Warn; use Test::Exception; use Encode qw( encode_utf8 ); -- 2.34.1