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

Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
This commit is contained in:
Jonathan Druart 2025-07-11 14:40:44 +02:00 committed by Lucas Gass
parent d6cbe0a25e
commit 53b3d5756e
No known key found for this signature in database
GPG Key ID: 60B447398B0D36CA
1 changed files with 3 additions and 2 deletions

View File

@ -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(
{