Bugzilla – Attachment 174257 Details for
Bug 37865
Use of uninitialized value $op in string at circulation.pl
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 37865: Fix uninitialized value $op warns
Bug-37865-Fix-uninitialized-value-op-warns.patch (text/plain), 1.85 KB, created by
Thomas Klausner
on 2024-11-07 15:53:19 UTC
(
hide
)
Description:
Bug 37865: Fix uninitialized value $op warns
Filename:
MIME Type:
Creator:
Thomas Klausner
Created:
2024-11-07 15:53:19 UTC
Size:
1.85 KB
patch
obsolete
>From 3b5ddffe1b540d5c36884acbd354c5424d2d3eff Mon Sep 17 00:00:00 2001 >From: Andrii Nugged <nugged@gmail.com> >Date: Mon, 29 Jul 2024 16:13:34 +0300 >Subject: [PATCH] Bug 37865: Fix uninitialized value $op warns > >[WARN] Use of uninitialized value $op in string eq at /usr/share/koha/intranet/cgi-bin/circ/circulation.pl line 144. >[WARN] Use of uninitialized value $op in string eq at /usr/share/koha/intranet/cgi-bin/circ/returns.pl line 253. >These happen in cases when $op is undef and circulation.pl or returns.pl tries to directly compare it to a string. > >To reproduce: >1. Go to "Check Out" and "Check In" circulation pages, or refresh already opened one. >2. Check your logs for "Use of uninitialized value $op" warning. >3. Apply patch. >4. Repeat step 1 and check that no new "Use of uninitialized value $op" error were logged. > >Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org> >Signed-off-by: Thomas Klausner <domm@plix.at> >--- > circ/circulation.pl | 2 +- > circ/returns.pl | 2 +- > 2 files changed, 2 insertions(+), 2 deletions(-) > >diff --git a/circ/circulation.pl b/circ/circulation.pl >index 1f9fb0a985..968470e6f1 100755 >--- a/circ/circulation.pl >+++ b/circ/circulation.pl >@@ -112,7 +112,7 @@ my ( $template, $loggedinuser, $cookie ) = get_template_and_user( > } > ); > >-my $op = $query->param('op'); >+my $op = $query->param('op') // ''; > my $override_high_holds = $query->param('override_high_holds'); > my $override_high_holds_tmp = $query->param('override_high_holds_tmp'); > >diff --git a/circ/returns.pl b/circ/returns.pl >index 7a7c642f95..7ea1aade36 100755 >--- a/circ/returns.pl >+++ b/circ/returns.pl >@@ -143,7 +143,7 @@ foreach ( $query->param ) { > push( @inputloop, \%input ); > } > >-my $op = $query->param('op'); >+my $op = $query->param('op') // ''; > > ############ > # Deal with the requests.... >-- >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 37865
:
171182
|
171185
|
171186
|
171187
|
171809
| 174257