Bugzilla – Attachment 76756 Details for
Bug 14446
Resolve "Use of uninitialized value in goto" in admin/preferences.pl
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 14446: Workaround to resolve uninitialized value in goto warning
Bug-14446-Workaround-to-resolve-uninitialized-valu.patch (text/plain), 1.45 KB, created by
Katrin Fischer
on 2018-07-08 11:02:08 UTC
(
hide
)
Description:
Bug 14446: Workaround to resolve uninitialized value in goto warning
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2018-07-08 11:02:08 UTC
Size:
1.45 KB
patch
obsolete
>From cb1ebd8446fa93bd36d6de0f9986b763a2692261 Mon Sep 17 00:00:00 2001 >From: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Date: Wed, 4 Jul 2018 16:03:33 +0200 >Subject: [PATCH] Bug 14446: Workaround to resolve uninitialized value in goto > warning > >Forcing both GetTab calls to list context resolves the warning. >A workaround, not a real fix. > >Test plan: >Search for something in the syspref text bar. >Without this patch, you will have a warn: Use of uninitialized value in goto >With this patch, you won't. > >Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com> > >Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> >--- > admin/preferences.pl | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > >diff --git a/admin/preferences.pl b/admin/preferences.pl >index 1e12b1e9a0..988753aed0 100755 >--- a/admin/preferences.pl >+++ b/admin/preferences.pl >@@ -229,7 +229,8 @@ sub SearchPrefs { > our @terms = split( /\s+/, $searchfield ); > > foreach my $tab_name ( keys %tab_files ) { >- my $data = GetTab( $input, $tab_name ); >+ # Force list context to remove 'uninitialized value in goto' warn coming from YAML::Syck; note that the other GetTab call is in list context too. The actual cause however is the null value for the pref OpacRenewalBranch in opac.pref >+ my ($data) = GetTab( $input, $tab_name ); > my $title = ( keys( %$data ) )[0]; > my $tab = $data->{ $title }; > $tab = { '' => $tab } if ( ref( $tab ) eq 'ARRAY' ); >-- >2.17.1
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 14446
:
76685
|
76712
| 76756