https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27161

            Bug ID: 27161
           Summary: Base.pm complains about unitialized value
 Change sponsored?: ---
           Product: Koha
           Version: 19.11
          Hardware: All
                OS: All
            Status: NEW
          Severity: trivial
          Priority: P5 - low
         Component: Architecture, internals, and plumbing
          Assignee: [email protected]
          Reporter: [email protected]
        QA Contact: [email protected]

I get several errors on 

 Use of uninitialized value in subroutine entry at
/usr/share/koha/lib/Koha/Plugins/Base.pm line 182.

177 sub get_metadata {
178     my ( $self, $args ) = @_;
179
180     #FIXME: Why another encoding issue? For metadata containing non latin
characters.
181     my $metadata = $self->{metadata};
182         utf8::decode($metadata->{$_}) for keys %$metadata;
183     return $metadata;
184 }


Verifying that $metadata value is set before applying utf8::decode will avoid
that log error

177 sub get_metadata {
178     my ( $self, $args ) = @_;
179
180     #FIXME: Why another encoding issue? For metadata containing non latin
characters.
181     my $metadata = $self->{metadata};
182     if ($metadata !~ "") {
183         utf8::decode($metadata->{$_}) for keys %$metadata;
184         }
185     return $metadata;
186 }

-- 
You are receiving this mail because:
You are watching all bug changes.
You are the assignee for the bug.
_______________________________________________
Koha-bugs mailing list
[email protected]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to