Bug 40350 - t/db_dependent/Holds.t generates warnings
Summary: t/db_dependent/Holds.t generates warnings
Status: Pushed to main
Alias: None
Product: Koha
Classification: Unclassified
Component: Test Suite (show other bugs)
Version: unspecified
Hardware: All All
: P5 - low minor
Assignee: Jonathan Druart
QA Contact: Martin Renvoize (ashimema)
URL:
Keywords:
Depends on:
Blocks: 25515
  Show dependency treegraph
 
Reported: 2025-07-11 12:40 UTC by Jonathan Druart
Modified: 2025-07-15 22:35 UTC (History)
1 user (show)

See Also:
GIT URL:
Change sponsored?: ---
Patch complexity: Trivial patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
25.11.00
Circulation function:


Attachments
Bug 40350: Remove warnings from t/db_dependent/Holds.t (1.62 KB, patch)
2025-07-11 12:41 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 40350: Remove warnings from t/db_dependent/Holds.t (1.69 KB, patch)
2025-07-12 10:12 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Jonathan Druart 2025-07-11 12:40:16 UTC
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.
Comment 1 Jonathan Druart 2025-07-11 12:41:35 UTC
Created attachment 183991 [details] [review]
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
Comment 2 Martin Renvoize (ashimema) 2025-07-12 10:12:56 UTC
Created attachment 184027 [details] [review]
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>
Comment 3 Lucas Gass (lukeg) 2025-07-15 22:35:11 UTC
Nice work everyone!

Pushed to main for 25.11