| Summary: | Warning in Koha::Item->columns_to_str | ||
|---|---|---|---|
| Product: | Koha | Reporter: | Fridolin Somers <fridolin.somers> |
| Component: | Architecture, internals, and plumbing | Assignee: | Bugs List <koha-bugs> |
| Status: | NEW --- | QA Contact: | Testopia <testopia> |
| Severity: | minor | ||
| Priority: | P5 - low | CC: | jonathan.druart |
| Version: | Main | ||
| Hardware: | All | ||
| OS: | All | ||
| See Also: | https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32060 | ||
| GIT URL: | Initiative type: | --- | |
| Sponsorship status: | --- | Comma delimited list of Sponsors: | |
| Crowdfunding goal: | 0 | Patch complexity: | --- |
| Documentation contact: | Documentation submission: | ||
| Text to go in the release notes: | Version(s) released in: | ||
| Circulation function: | |||
| Bug Depends on: | |||
| Bug Blocks: | 25790 | ||
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;
}
}
|
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>