Bug 40641 - Patron.pm can create warnings
Summary: Patron.pm can create warnings
Status: Pushed to main
Alias: None
Product: Koha
Classification: Unclassified
Component: Architecture, internals, and plumbing (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal
Assignee: Lucas Gass (lukeg)
QA Contact: Tomás Cohen Arazi (tcohen)
URL:
Keywords:
Depends on: 22632
Blocks:
  Show dependency treegraph
 
Reported: 2025-08-12 21:52 UTC by Lucas Gass (lukeg)
Modified: 2025-08-13 15:19 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 40641: Fallback to empty values when logging action (1.40 KB, patch)
2025-08-12 21:53 UTC, Lucas Gass (lukeg)
Details | Diff | Splinter Review
Bug 40641: Fallback to empty values when logging action (1.46 KB, patch)
2025-08-13 14:29 UTC, Lucas Gass (lukeg)
Details | Diff | Splinter Review
Bug 40641: Fallback to empty values when logging action (1.83 KB, patch)
2025-08-13 14:31 UTC, Tomás Cohen Arazi (tcohen)
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Lucas Gass (lukeg) 2025-08-12 21:52:10 UTC
Use of uninitialized value in concatenation (.) or string at /kohadevbox/koha/Koha/Patron.pm line 797.


Because of this t/db_dependent/Patron/Borrower_Debarments.t fails
Comment 1 Lucas Gass (lukeg) 2025-08-12 21:53:34 UTC
Created attachment 185356 [details] [review]
Bug 40641: Fallback to empty values when logging action
Comment 2 Lucas Gass (lukeg) 2025-08-13 14:27:18 UTC
This is due to Bug 22632.
Comment 3 Lucas Gass (lukeg) 2025-08-13 14:29:09 UTC
Created attachment 185372 [details] [review]
Bug 40641: Fallback to empty values when logging action

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Comment 4 Lucas Gass (lukeg) 2025-08-13 14:29:49 UTC
Trivial patch and the obvious cause of the regression, self sign-off.
Comment 5 Tomás Cohen Arazi (tcohen) 2025-08-13 14:31:04 UTC
Created attachment 185373 [details] [review]
Bug 40641: Fallback to empty values when logging action

Bug 22632 introduced the merge logging feature but missed to sanitize strings to avoid warnings.
This patch fixes that.

To test:
1. Run:
   $ ktd --shell
  k$ prove t/db_dependent/Patron/Borrower_Debarments.t
=> FAIL: Tests fail! Warnings introduced!
2. Apply this patch
3. Repeat 1
=> SUCCESS: Tests pass!
4. Sign off :-D

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 6 Lucas Gass (lukeg) 2025-08-13 15:19:26 UTC
Pushed to main for 25.11.x, thanks all.