Bugzilla – Attachment 115795 Details for
Bug 27549
Warning "use of uninitialized value" on renew.pl
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 27549: "use of uninitialized value" warning on renew.pl
Bug-27549-use-of-uninitialized-value-warning-on-re.patch (text/plain), 1.62 KB, created by
David Nind
on 2021-01-25 23:30:03 UTC
(
hide
)
Description:
Bug 27549: "use of uninitialized value" warning on renew.pl
Filename:
MIME Type:
Creator:
David Nind
Created:
2021-01-25 23:30:03 UTC
Size:
1.62 KB
patch
obsolete
>From 2391da32481861826af6fc89fac115515d58ab97 Mon Sep 17 00:00:00 2001 >From: Petro Vashchuk <stalkernoid@gmail.com> >Date: Mon, 25 Jan 2021 17:37:37 +0200 >Subject: [PATCH] Bug 27549: "use of uninitialized value" warning on renew.pl > >On the beginning we have empty "barcode" parameter for this form, but that not taken into account in regular expression warning emitted: "Use of uninitialized value $barcode in substitution (s///) at /usr/share/koha/intranet/cgi-bin/circ/renew.pl line 47." in renew.pl >Fixed by making $barcode to become an empty string by default. > >To reproduce: > 1) Head over to the "Circulation -> Renew" page. > 2) Check intranet-error.log there will be a warning "Use of uninitialized value $barcode in substitution (s///) at /usr/share/koha/intranet/cgi-bin/circ/renew.pl line 47". > 3) Apply the patch, refresh the "Renew" page. > 4) Ensure that the new "use of uninitialized value" warnings didn't appear in the console. > >Signed-off-by: David Nind <david@davidnind.com> >--- > circ/renew.pl | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/circ/renew.pl b/circ/renew.pl >index 28a25c2846..acce7770af 100755 >--- a/circ/renew.pl >+++ b/circ/renew.pl >@@ -42,7 +42,7 @@ my ( $template, $librarian, $cookie, $flags ) = get_template_and_user( > > my $schema = Koha::Database->new()->schema(); > >-my $barcode = $cgi->param('barcode'); >+my $barcode = $cgi->param('barcode') // ''; > my $unseen = $cgi->param('unseen') || 0; > $barcode =~ s/^\s*|\s*$//g; # remove leading/trailing whitespae > $barcode = barcodedecode($barcode) if( $barcode && C4::Context->preference('itemBarcodeInputFilter')); >-- >2.11.0
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 27549
:
115783
|
115795
|
116098