Bugzilla – Attachment 194109 Details for
Bug 41940
Use of uninitialized value... warnings in circulation.pl
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 41940: Use of uninitialized value... warnings in circulation.pl
f0c7e64.patch (text/plain), 2.30 KB, created by
David Nind
on 2026-02-27 17:22:50 UTC
(
hide
)
Description:
Bug 41940: Use of uninitialized value... warnings in circulation.pl
Filename:
MIME Type:
Creator:
David Nind
Created:
2026-02-27 17:22:50 UTC
Size:
2.30 KB
patch
obsolete
>From f0c7e64c8d60931dacb28b39af45ac410b184933 Mon Sep 17 00:00:00 2001 >From: Roman Dolny <roman.dolny@jezuici.pl> >Date: Wed, 25 Feb 2026 19:39:13 +0000 >Subject: [PATCH] Bug 41940: Use of uninitialized value... warnings in > circulation.pl > >The warnings: > >[WARN] Use of uninitialized value $patron_session_confirmation in split > at /kohadevbox/koha/circ/circulation.pl line 493. >[WARN] Use of uninitialized value $patron_for_session in numeric eq (==) > at /kohadevbox/koha/circ/circulation.pl line 494. >[WARN] Use of uninitialized value $session_confirmations in split > at /kohadevbox/koha/circ/circulation.pl line 495. > >appears in the plack-intranet-error.log. > >Test plan: >========== >1. Use a fresh KTD, observe plack-intranet-error.log. >2. Have a barcode of existing item. >3. Find any patron and go to "Check out" tab. >4. Check out item. >==> Warnings should appear in plack-intranet-error.log >5. Apply the patch; restart_all. >6. Repeat 2-4 with another barcode. >==> No warnings in plack-intranet-error.log. > >Sponsored-by: Ignatianum University in Cracow >Signed-off-by: David Nind <david@davidnind.com> >--- > circ/circulation.pl | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > >diff --git a/circ/circulation.pl b/circ/circulation.pl >index dddd2a1f5f..f4a2339ce0 100755 >--- a/circ/circulation.pl >+++ b/circ/circulation.pl >@@ -489,10 +489,10 @@ if ( @$barcodes && $op eq 'cud-checkout' ) { > $template_params->{ADDITIONAL_MATERIALS} = $materials; > $template_params->{itemhomebranch} = $item->homebranch; > >- my $patron_session_confirmation = $query->cookie('patronSessionConfirmation') || undef; >+ my $patron_session_confirmation = $query->cookie('patronSessionConfirmation') || ''; > my ( $patron_for_session, $session_confirmations ) = split( /:/, $patron_session_confirmation, 2 ); >- my $patron_match = $borrowernumber == $patron_for_session; >- my @conf_keys = split( /\|/, $session_confirmations ); >+ my $patron_match = $borrowernumber == ( $patron_for_session // 0 ); >+ my @conf_keys = split( /\|/, $session_confirmations // '' ); > if ( $patron_match && grep { $_ eq 'cancelreserve' } @conf_keys ) { > $cancelreserve = 1; > } >-- >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 41940
:
193940
| 194109