Bugzilla – Attachment 193340 Details for
Bug 41870
Warning "Use of uninitialized value $borrowernumber" in opac-detail.pl
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 41870: Warning "Use of uninitialized value $borrowernumber" in opac-detail.pl
Bug-41870-Warning-Use-of-uninitialized-value-borro.patch (text/plain), 1.85 KB, created by
Janusz Kaczmarek
on 2026-02-18 10:46:51 UTC
(
hide
)
Description:
Bug 41870: Warning "Use of uninitialized value $borrowernumber" in opac-detail.pl
Filename:
MIME Type:
Creator:
Janusz Kaczmarek
Created:
2026-02-18 10:46:51 UTC
Size:
1.85 KB
patch
obsolete
>From 8539183a4c91cd09b7519a915ce1fa7d9551b5b6 Mon Sep 17 00:00:00 2001 >From: Janusz Kaczmarek <januszop@gmail.com> >Date: Wed, 18 Feb 2026 10:43:37 +0000 >Subject: [PATCH] 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 >--- > opac/opac-detail.pl | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/opac/opac-detail.pl b/opac/opac-detail.pl >index edf609cb02..c0976ad317 100755 >--- a/opac/opac-detail.pl >+++ b/opac/opac-detail.pl >@@ -595,7 +595,7 @@ if ( $show_holds_count || $show_priority ) { > $template->param( holds_count => $holds->count ); > while ( my $hold = $holds->next ) { > $item_reserves{ $hold->itemnumber }++ if $hold->itemnumber; >- if ( $show_priority && $hold->borrowernumber == $borrowernumber ) { >+ if ( $show_priority && $borrowernumber && $hold->borrowernumber == $borrowernumber ) { > $has_hold = 1; > $hold->itemnumber > ? ( $priority{ $hold->itemnumber } = $hold->priority ) >-- >2.39.5
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 41870
:
193340
|
193363