Bug 36940

Summary: Resolve two Auth warnings when AutoLocation is enabled having a branch without branchip
Product: Koha Reporter: Marcel de Rooy <m.de.rooy>
Component: Architecture, internals, and plumbingAssignee: Marcel de Rooy <m.de.rooy>
Status: Pushed to main --- QA Contact: Nick Clemens (kidclamp) <nick>
Severity: trivial    
Priority: P5 - low CC: martin.renvoize, nick
Version: Main   
Hardware: All   
OS: All   
See Also: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36944
Change sponsored?: --- Patch complexity: Trivial patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
24.11.00
Attachments: Bug 36940: Resolve two warnings on undefined branchip
Bug 36940: Resolve two warnings on undefined branchip

Description Marcel de Rooy 2024-05-23 08:47:23 UTC
From 22.11 but still on master too:

[2024/05/23 10:37:11] [WARN] Use of uninitialized value $domain in substitution (s///) at /usr/share/koha/C4/Auth.pm line 1199.
[2024/05/23 10:37:11] [WARN] Use of uninitialized value $domain in regexp compilation at /usr/share/koha/C4/Auth.pm line 1200.
Comment 1 Marcel de Rooy 2024-05-23 08:50:57 UTC
These are the master ones:

[2024/05/23 08:50:30] [WARN] Use of uninitialized value $domain in substitution (s///) at /usr/share/koha/C4/Auth.pm line 1222.
[2024/05/23 08:50:30] [WARN] Use of uninitialized value $domain in substitution (s///) at /usr/share/koha/C4/Auth.pm line 1223.
[2024/05/23 08:50:30] [WARN] Use of uninitialized value $domain in regexp compilation at /usr/share/koha/C4/Auth.pm line 1224.
Comment 2 Marcel de Rooy 2024-05-23 08:51:59 UTC
Created attachment 167079 [details] [review]
Bug 36940: Resolve two warnings on undefined branchip

If you enabled AutoLocation and have a branch without ip, this
triggers warnings.

Test plan:
Check logs in this situation with/without this patch by logging out
and in again on staff.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 3 Marcel de Rooy 2024-05-23 09:21:12 UTC
Noticed that turning on AutoLocation will make Auth.t fail. But thats outside the scope of this trivial report.
Comment 4 Marcel de Rooy 2024-05-23 09:22:32 UTC
Trivial: Self SO
Comment 5 Nick Clemens (kidclamp) 2024-05-30 13:36:52 UTC
Created attachment 167274 [details] [review]
Bug 36940: Resolve two warnings on undefined branchip

If you enabled AutoLocation and have a branch without ip, this
triggers warnings.

Test plan:
Check logs in this situation with/without this patch by logging out
and in again on staff.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 6 Martin Renvoize 2024-06-13 13:33:10 UTC
Thanks for all the hard work!

Pushed to main for the next 24.11.00 release as RM Assistant