Bug 41870 - Warning "Use of uninitialized value $borrowernumber" in opac-detail.pl
Summary: Warning "Use of uninitialized value $borrowernumber" in opac-detail.pl
Status: Signed Off
Alias: None
Product: Koha
Classification: Unclassified
Component: OPAC (show other bugs)
Version: unspecified
Hardware: All All
: P5 - low minor
Assignee: Janusz Kaczmarek
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2026-02-18 10:40 UTC by Janusz Kaczmarek
Modified: 2026-02-18 17:41 UTC (History)
0 users

See Also:
GIT URL:
Initiative type: ---
Sponsorship status: Sponsored
Comma delimited list of Sponsors:
Crowdfunding goal: 0
Patch complexity: Trivial patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:


Attachments
Bug 41870: Warning "Use of uninitialized value $borrowernumber" in opac-detail.pl (1.85 KB, patch)
2026-02-18 10:46 UTC, Janusz Kaczmarek
Details | Diff | Splinter Review
Bug 41870: Warning "Use of uninitialized value $borrowernumber" in opac-detail.pl (1.90 KB, patch)
2026-02-18 17:41 UTC, Roman Dolny
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Janusz Kaczmarek 2026-02-18 10:40:57 UTC
Under some circumstances (OPACShowHoldQueueDetails set, hold made, OPAC user not logged in) a warning like: 

[WARN] Use of uninitialized value $borrowernumber in numeric eq (==) at /kohadevbox/koha/opac/opac-detail.pl line 598.

is being generated.
Comment 1 Janusz Kaczmarek 2026-02-18 10:46:51 UTC
Created attachment 193340 [details] [review]
Bug 41870: Warning "Use of uninitialized value $borrowernumber" in opac-detail.pl

Under some circumstances (OPACShowHoldQueueDetails set, hold made,
OPAC user not logged in) a warning like:

[WARN] Use of uninitialized value $borrowernumber in numeric eq (==) at /kohadevbox/koha/opac/opac-detail.pl line 598.

is being generated.

Test plan:
==========
1. Set OPACShowHoldQueueDetails to 'Show holds and their priority
   levels'.
2. From staff interface, place a hold on a record for any borrower.
3. Open a fresh browser (private mode or different browser), confirm
   that you are not logged in, go to this record.
4. Check the content of plack-opac-error.log. You should see a
   warning like:
   [WARN] Use of uninitialized value $borrowernumber in numeric eq (==) at /kohadevbox/koha/opac/opac-detail.pl line 598
5. Apply the patch ; restart_all.
6. Repeat p. 3 & 4. There should be no new warning now.

Sponsored-by: Ignatianum University in Cracow
Comment 2 Roman Dolny 2026-02-18 17:41:28 UTC
Created attachment 193363 [details] [review]
Bug 41870: Warning "Use of uninitialized value $borrowernumber" in opac-detail.pl

Under some circumstances (OPACShowHoldQueueDetails set, hold made,
OPAC user not logged in) a warning like:

[WARN] Use of uninitialized value $borrowernumber in numeric eq (==) at /kohadevbox/koha/opac/opac-detail.pl line 598.

is being generated.

Test plan:
==========
1. Set OPACShowHoldQueueDetails to 'Show holds and their priority
   levels'.
2. From staff interface, place a hold on a record for any borrower.
3. Open a fresh browser (private mode or different browser), confirm
   that you are not logged in, go to this record.
4. Check the content of plack-opac-error.log. You should see a
   warning like:
   [WARN] Use of uninitialized value $borrowernumber in numeric eq (==) at /kohadevbox/koha/opac/opac-detail.pl line 598
5. Apply the patch ; restart_all.
6. Repeat p. 3 & 4. There should be no new warning now.

Sponsored-by: Ignatianum University in Cracow
Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>