From 601383d52e64fbbefbdbfe8b05b0fcf0dc46e048 Mon Sep 17 00:00:00 2001 From: Kyle M Hall Date: Tue, 30 Jun 2020 12:20:39 -0400 Subject: [PATCH] Bug 28228: Supress plugin related error message MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Use of uninitialized value in subroutine entry at /usr/share/koha/lib/Koha/Plugins/Base.pm line 182. Test Plan: 1) Install the Kitchen Sink plugin ( it does not have a max versio defined ) 2) Note the warning in your logs 3) Apply this patch 4) Restart all the things 5) No warning! Signed-off-by: Fridolin Somers Signed-off-by: Joonas Kylmälä Signed-off-by: Jonathan Druart Signed-off-by: Kyle M Hall --- Koha/Plugins/Base.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Koha/Plugins/Base.pm b/Koha/Plugins/Base.pm index a5cb15e3c1..d6323e830e 100644 --- a/Koha/Plugins/Base.pm +++ b/Koha/Plugins/Base.pm @@ -179,7 +179,7 @@ sub get_metadata { #FIXME: Why another encoding issue? For metadata containing non latin characters. my $metadata = $self->{metadata}; - $metadata->{$_} && utf8::decode($metadata->{$_}) for keys %$metadata; + defined($metadata->{$_}) && utf8::decode($metadata->{$_}) for keys %$metadata; return $metadata; } -- 2.39.5