[Koha-bugs] [Bug 21036] Just a bunch of warnings

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Thu Jul 5 10:16:51 CEST 2018


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

--- Comment #5 from Marcel de Rooy <m.de.rooy at rijksmuseum.nl> ---
Created attachment 76702
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=76702&action=edit
Bug 21036: Fix warnings from C4/Biblio

Use of uninitialized value $isbn in string ne at
/usr/share/koha/prodclone/C4/Biblio.pm line 1794. (16.11 line number)
Trivial edit.

And these warnings from TransformHtmlToXml (with 16.11 line numbers):
Use of uninitialized value in substr at /usr/share/koha/prodclone/C4/Biblio.pm
line 2527.
Use of uninitialized value in substr at /usr/share/koha/prodclone/C4/Biblio.pm
line 2528.
substr outside of string at /usr/share/koha/prodclone/C4/Biblio.pm line 2528.
Indicator in 952 is empty at /usr/share/koha/prodclone/C4/Biblio.pm line 2534.

The last warning is not needed and can be removed.
Note that the code used the construct @$indicator[$j] for $$indicator[$j].
The first is an array slice. This worked in list context. But apparently
the second was meant to be used. And can be rewritten as $indicator->[$j]
which generally is considered more readable.
The code around indicator1/2 and ind1/2 is simplified. This change is applied
twice in the same sub.

Test plan:
Read the changes.
Run t/Biblio/TransformHtmlToXml.t

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.


More information about the Koha-bugs mailing list