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

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Wed May 1 11:43:17 CEST 2019


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

Martin Renvoize <martin.renvoize at ptfs-europe.com> changed:

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

--- Comment #15 from Martin Renvoize <martin.renvoize at ptfs-europe.com> ---
Created attachment 89165
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=89165&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

Signed-off-by: Martin Renvoize <martin.renvoize at ptfs-europe.com>

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


More information about the Koha-bugs mailing list