Bugzilla – Attachment 114360 Details for
Bug 27161
Base.pm complains about unitialized value
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Base.pm patch to fix uninitialize variable error
Base.pm.patch (text/plain), 1.17 KB, created by
Alvaro Cornejo
on 2020-12-12 04:17:53 UTC
(
hide
)
Description:
Base.pm patch to fix uninitialize variable error
Filename:
MIME Type:
Creator:
Alvaro Cornejo
Created:
2020-12-12 04:17:53 UTC
Size:
1.17 KB
patch
obsolete
>From 32bfd2fe945e7aef6f489ddaf1c80be018622663 Mon Sep 17 00:00:00 2001 >From: Alvaro Cornejo <cornejo.alvaro@gmail.com> >Date: Fri, 11 Dec 2020 23:02:06 -0500 >Subject: [PATCH] Bug 27161: Base.pm complains about unitialized value > >This patch does validate that $metadata exists and is set in sub get_metadata > >TEST PLAN >Before applying the patch >tail plack error log and see errors like: > >Use of uninitialized value in subroutine entry at line 182 in Base.pm > >Apply the patch > >restart koha-common service > >tail plack error log and verify no more erros appear. >--- > Koha/Plugins/Base.pm | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > >diff --git a/Koha/Plugins/Base.pm b/Koha/Plugins/Base.pm >index 295e351c86..8c7b1924e6 100644 >--- a/Koha/Plugins/Base.pm >+++ b/Koha/Plugins/Base.pm >@@ -179,7 +179,9 @@ sub get_metadata { > > #FIXME: Why another encoding issue? For metadata containing non latin characters. > my $metadata = $self->{metadata}; >- utf8::decode($metadata->{$_}) for keys %$metadata; >+ if ( $metadata & $metadata !~ "") { >+ utf8::decode($metadata->{$_}) for keys %$metadata; >+ } > return $metadata; > } > >-- >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 27161
:
114295
| 114360