[Koha-bugs] [Bug 21036] Fix a bunch of older warnings

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Thu Sep 6 08:38:15 CEST 2018


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

Marcel de Rooy <m.de.rooy at rijksmuseum.nl> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #76702|0                           |1
        is obsolete|                            |

--- Comment #10 from Marcel de Rooy <m.de.rooy at rijksmuseum.nl> ---
Created attachment 78455
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=78455&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 watching all bug changes.


More information about the Koha-bugs mailing list