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

2018-07-05 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21036

Marcel de Rooy  changed:

   What|Removed |Added

  Attachment #76703|0   |1
is obsolete||

--- Comment #7 from Marcel de Rooy  ---
Created attachment 76704
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=76704=edit
Bug 21036: Remove odd number of elements warnings from AuthoritiesMarc.pm

Like this one (16.11 line number):
Odd number of elements in anonymous hash at C4/AuthoritiesMarc.pm line 1070.

We need to add a scalar to some MARC::Field::subfield calls. In list context
an empty list returned affects the hash built around it.

Test plan:
Could reproduce this warning easily from OPAC authority search.
opac-authorities-home.pl calling BuildSummary.

-- 
You are receiving this mail because:
You are watching all bug changes.
You are the assignee for the bug.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


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

2018-07-05 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21036

--- Comment #6 from Marcel de Rooy  ---
Created attachment 76703
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=76703=edit
Bug 21036: Remove odd number of elements warnings from AuthoritiesMarc.pm

Like this one (16.11 line number):
Odd number of elements in anonymous hash at C4/AuthoritiesMarc.pm line 1070.

We need to add a scalar to some MARC::Field::subfield calls. In list context
the empty list returned might affect the parameter hash around it.

Test plan:
Could reproduce this warning easily from OPAC authority search.
opac-authorities-home.pl calling BuildSummary.

-- 
You are receiving this mail because:
You are watching all bug changes.
You are the assignee for the bug.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


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

2018-07-05 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21036

--- Comment #5 from Marcel de Rooy  ---
Created attachment 76702
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=76702=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.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


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

2018-07-05 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21036

--- Comment #4 from Marcel de Rooy  ---
(In reply to Jonathan Druart from comment #3)
> (In reply to Marcel de Rooy from comment #2)
> > Read the change. Not 100% identical (numeric zero) but should be enough.
> > This line is probably not needed at all.
> 
> Regarding
>   commit 26469d87a261682dcbde0f41faa844133d10ed5e
>   bug 2520: don't change item-level requests to bib-level
> 
> It is used to test
>   
> if item_level_hold it not set.

Thx.
That should still work as expected. The itemnumber==0 case is only
hypothetical; we do not have such items. Clearing the field should be fine.

If the line is needed or not here actually depends on if ModReserve and the
routines it calls, can handle an empty string for itemnumber. I would think
they do, but to be safe I do not remove the line.

-- 
You are receiving this mail because:
You are watching all bug changes.
You are the assignee for the bug.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


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

2018-07-04 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21036

Jonathan Druart  changed:

   What|Removed |Added

 CC||jonathan.dru...@bugs.koha-c
   ||ommunity.org

--- Comment #3 from Jonathan Druart  
---
(In reply to Marcel de Rooy from comment #2)
> Read the change. Not 100% identical (numeric zero) but should be enough.
> This line is probably not needed at all.

Regarding
  commit 26469d87a261682dcbde0f41faa844133d10ed5e
  bug 2520: don't change item-level requests to bib-level

It is used to test
  
if item_level_hold it not set.

-- 
You are receiving this mail because:
You are watching all bug changes.
You are the assignee for the bug.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


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

2018-07-04 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21036

--- Comment #2 from Marcel de Rooy  ---
Created attachment 76689
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=76689=edit
Bug 21036: Fix uninitialized value within @itemnumber in string ne

Line from 16.11 log:
Use of uninitialized value within @itemnumber in string ne at
/usr/share/koha/prodclone/reserve/modrequest.pl line 70.

Test plan:
Read the change. Not 100% identical (numeric zero) but should be enough.
This line is probably not needed at all.

-- 
You are receiving this mail because:
You are watching all bug changes.
You are the assignee for the bug.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


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

2018-07-04 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21036

--- Comment #1 from Marcel de Rooy  ---
Created attachment 76686
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=76686=edit
Bug 21036: Fix CGI::param in list context warning from opac-passwd.pl

Resolve:
CGI::param called in list context from package
CGI::Compile::ROOT::usr_share_koha_prodclone_opac_opac_2dpasswd_2epl line 55,
this can lead to vulnerabilities. See the warning in "Fetching the value or
values of a single named parameter" at /usr/share/perl5/CGI.pm line 436.

Add a scalar.

Test plan:
Speaks for itself.

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/