[Bug 32462] New: Warning in Koha::Item->columns_to_str
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32462 Bug ID: 32462 Summary: Warning in Koha::Item->columns_to_str Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: minor Priority: P5 - low Component: Architecture, internals, and plumbing Assignee: koha-bugs@lists.koha-community.org Reporter: fridolin.somers@biblibre.com QA Contact: testopia@bugs.koha-community.org I see this warning : [WARN] Use of uninitialized value in join or string at /home/koha/src/Koha/Item.pm line 1041. I think it is in Koha::Item->columns_to_str() when more_subfields_xml contains an empty subfield : <record> <leader> a </leader> <datafield tag="999" ind1=" " ind2=" "> <subfield code="q"></subfield> </datafield> </record> -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32462 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=32060 -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32462 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |25790 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25790 [Bug 25790] [OMNIBUS] warnings removal -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32462 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart+koha@gmail. | |com --- Comment #1 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- This change could work. diff --git a/Koha/Item.pm b/Koha/Item.pm index e508e7eb55c..f431f739b4f 100644 --- a/Koha/Item.pm +++ b/Koha/Item.pm @@ -1107,7 +1107,7 @@ sub columns_to_str { } while ( my ( $k, $v ) = each %$more_values ) { - $values->{$k} = join ' | ', @$v; + $values->{$k} = join ' | ', map { defined $_ ? $_ : q{} } @$v; } } -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org