From 7ee37381f6c3b0853cc1bd436cdc2fbdd01840e7 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Fri, 11 Jul 2025 14:40:44 +0200 Subject: [PATCH] Bug 40350: Remove warnings from t/db_dependent/Holds.t Use of uninitialized value in numeric le (<=) at /kohadevbox/koha/C4/Circulation.pm line 3151. Use of uninitialized value in addition (+) at /kohadevbox/koha/C4/Circulation.pm line 3158. Use of uninitialized value in numeric le (<=) at /kohadevbox/koha/C4/Circulation.pm line 3151. Use of uninitialized value in addition (+) at /kohadevbox/koha/C4/Circulation.pm line 3158. Use of uninitialized value in numeric le (<=) at /kohadevbox/koha/C4/Circulation.pm line 3151. Use of uninitialized value in addition (+) at /kohadevbox/koha/C4/Circulation.pm line 3158. $issue->renewal_count is undefined in C4::Circulation:3151, but it's NOT NULL in DB We need to refetch the row to get the default defined at the DB level --- t/db_dependent/Holds.t | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/t/db_dependent/Holds.t b/t/db_dependent/Holds.t index 5157b1121ef..65b735676f6 100755 --- a/t/db_dependent/Holds.t +++ b/t/db_dependent/Holds.t @@ -7,7 +7,8 @@ use t::lib::TestBuilder; use C4::Context; -use Test::More tests => 72; +use Test::More tests => 73; +use Test::NoWarnings; use Test::Exception; use MARC::Record; @@ -1653,7 +1654,7 @@ subtest 'non priority holds' => sub { itemnumber => $item->itemnumber, branchcode => $item->homebranch } - )->store; + )->store->get_from_storage; my $hid = AddReserve( { -- 2.34.1