Bugzilla – Attachment 115794 Details for
Bug 27548
Warnings "use of uninitialized value" on branchoverdues.pl
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 27548: "use of uninitialized value" warning on branchoverdues.pl
Bug-27548-use-of-uninitialized-value-warning-on-br.patch (text/plain), 1.76 KB, created by
David Nind
on 2021-01-25 23:23:01 UTC
(
hide
)
Description:
Bug 27548: "use of uninitialized value" warning on branchoverdues.pl
Filename:
MIME Type:
Creator:
David Nind
Created:
2021-01-25 23:23:01 UTC
Size:
1.76 KB
patch
obsolete
>From be74af494f4a3bbe7d6329a2e9465ffccde4c026 Mon Sep 17 00:00:00 2001 >From: Petro Vashchuk <stalkernoid@gmail.com> >Date: Mon, 25 Jan 2021 17:35:18 +0200 >Subject: [PATCH] Bug 27548: "use of uninitialized value" warning on > branchoverdues.pl > >On the beginning we have empty "location" parameter for this form, but that not taken into account in comparison and undef warning emitted: "Use of uninitialized value $location in string eq at /usr/share/koha/intranet/cgi-bin/circ/branchoverdues.pl line 72" in branchoverdues.pl >Fixed by adding pre-check for $location. > >To reproduce: > 1) Head over to "Circulation ->Overdues with fines" page. Check intranet-error.log where there will be many warnings "Use of uninitialized value $location in string eq at /usr/share/koha/intranet/cgi-bin/circ/branchoverdues.pl line 72". > 2) Apply the patch, refresh the "Overdues with fines" page. > 3) Ensure that the new "use of uninitialized value" warnings didn't appear in the console. > >Signed-off-by: David Nind <david@davidnind.com> >--- > circ/branchoverdues.pl | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/circ/branchoverdues.pl b/circ/branchoverdues.pl >index 43f3a86227..c36aa3d451 100755 >--- a/circ/branchoverdues.pl >+++ b/circ/branchoverdues.pl >@@ -69,7 +69,7 @@ my ($tag,$subfield) = GetMarcFromKohaField( 'items.location' ); > my $tagslib = &GetMarcStructure(1,''); > if ($tagslib->{$tag}->{$subfield}->{authorised_value}) { > my $values= GetAuthorisedValues($tagslib->{$tag}->{$subfield}->{authorised_value}); >- for (@$values) { $_->{selected} = 1 if $location eq $_->{authorised_value} } >+ for (@$values) { $_->{selected} = 1 if defined $location && $location eq $_->{authorised_value} } > $template->param(locationsloop => $values); > } > # now display infos >-- >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 27548
:
115781
|
115794
|
116099