Bug 40371 - t/db_dependent/Budgets.t generates warnings
Summary: t/db_dependent/Budgets.t generates warnings
Status: Signed Off
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: Testopia
URL:
Keywords:
Depends on:
Blocks: 25515
  Show dependency treegraph
 
Reported: 2025-07-15 08:58 UTC by Jonathan Druart
Modified: 2025-07-16 08:58 UTC (History)
2 users (show)

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


Attachments
Bug 40371: Remove warnings from Budgets.t output (2.50 KB, patch)
2025-07-15 08:59 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 40371: Remove warnings from Budgets.t output (2.57 KB, patch)
2025-07-16 08:57 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-15 08:58:32 UTC
t/db_dependent/Budgets.t .. 153/156 Use of uninitialized value in multiplication (*) at /kohadevbox/koha/Koha/Acquisition/Order.pm line 543.                                                                         
Use of uninitialized value in numeric eq (==) at /kohadevbox/koha/Koha/Acquisition/Order.pm line 554.     
t/db_dependent/Budgets.t .. 154/156 Use of uninitialized value in multiplication (*) at /kohadevbox/koha/Koha/Acquisition/Order.pm line 543.                                                                         
Use of uninitialized value in numeric eq (==) at /kohadevbox/koha/Koha/Acquisition/Order.pm line 554.
t/db_dependent/Budgets.t .. 155/156 Use of uninitialized value in addition (+) at /kohadevbox/koha/Koha/Acquisition/Order.pm line 510.
Comment 1 Jonathan Druart 2025-07-15 08:59:47 UTC
Created attachment 184074 [details] [review]
Bug 40371: Remove warnings from Budgets.t output

t/db_dependent/Budgets.t .. 153/156 Use of uninitialized value in multiplication (*) at /kohadevbox/koha/Koha/Acquisition/Order.pm line 543.
Use of uninitialized value in numeric eq (==) at /kohadevbox/koha/Koha/Acquisition/Order.pm line 554.
t/db_dependent/Budgets.t .. 154/156 Use of uninitialized value in multiplication (*) at /kohadevbox/koha/Koha/Acquisition/Order.pm line 543.
Use of uninitialized value in numeric eq (==) at /kohadevbox/koha/Koha/Acquisition/Order.pm line 554.
t/db_dependent/Budgets.t .. 155/156 Use of uninitialized value in addition (+) at /kohadevbox/koha/Koha/Acquisition/Order.pm line 510.

This change seems correct, but I am not 100% sure it won't introduce a
regression. What about 0 vs undef?
Comment 2 Jonathan Druart 2025-07-15 09:00:15 UTC
Nick, do you think this change is safe?
Comment 3 Martin Renvoize (ashimema) 2025-07-16 08:57:04 UTC
Created attachment 184126 [details] [review]
Bug 40371: Remove warnings from Budgets.t output

t/db_dependent/Budgets.t .. 153/156 Use of uninitialized value in multiplication (*) at /kohadevbox/koha/Koha/Acquisition/Order.pm line 543.
Use of uninitialized value in numeric eq (==) at /kohadevbox/koha/Koha/Acquisition/Order.pm line 554.
t/db_dependent/Budgets.t .. 154/156 Use of uninitialized value in multiplication (*) at /kohadevbox/koha/Koha/Acquisition/Order.pm line 543.
Use of uninitialized value in numeric eq (==) at /kohadevbox/koha/Koha/Acquisition/Order.pm line 554.
t/db_dependent/Budgets.t .. 155/156 Use of uninitialized value in addition (+) at /kohadevbox/koha/Koha/Acquisition/Order.pm line 510.

This change seems correct, but I am not 100% sure it won't introduce a
regression. What about 0 vs undef?

Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Comment 4 Martin Renvoize (ashimema) 2025-07-16 08:58:52 UTC
I agree with your comment there.. we might have a problem with 0 vs NULL. However, I can't spot any obvious regressions.. I feel perhaps we should go with this and carefully monitor.