Bug 18921 - Resolve a few warnings in C4/XSLT.pm
Summary: Resolve a few warnings in C4/XSLT.pm
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Architecture, internals, and plumbing (show other bugs)
Version: unspecified
Hardware: All All
: P5 - low trivial (vote)
Assignee: Marcel de Rooy
QA Contact: Testopia
URL:
Keywords: Academy
Depends on:
Blocks:
 
Reported: 2017-07-10 12:15 UTC by Marcel de Rooy
Modified: 2019-10-14 19:56 UTC (History)
3 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments
Bug 18921: Resolve a few warnings in C4/XSLT.pm (2.53 KB, patch)
2017-07-10 12:19 UTC, Marcel de Rooy
Details | Diff | Splinter Review
Bug 18921: Resolve a few warnings in C4/XSLT.pm (2.55 KB, patch)
2017-09-05 21:15 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 18921: Resolve a few warnings in C4/XSLT.pm (2.63 KB, patch)
2017-09-07 17:35 UTC, Jonathan Druart
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Marcel de Rooy 2017-07-10 12:15:39 UTC

    
Comment 1 Marcel de Rooy 2017-07-10 12:19:55 UTC
Created attachment 64957 [details] [review]
Bug 18921: Resolve a few warnings in C4/XSLT.pm

Resolves warnings like:

Use of uninitialized value in hash element at C4/XSLT.pm line 262.
Use of uninitialized value in numeric eq (==) at C4/XSLT.pm line 267.
Use of uninitialized value $status in concatenation (.) or string at C4/XSLT.pm line 300.

Note: Line numbers are not exactly the same anymore.

Test plan:
[1] Enable XSLT view in OPAC
[2] Without this patch, you will probably have some of these warnings when
    doing some opac searches.
[3] Apply this patch. Check the logs again.
Comment 2 Katrin Fischer 2017-08-26 22:29:13 UTC
Same here:
Tried to test this, but was not able to make the warn show in the logs on
kohadevbox. Checked koha-plack-err and koha-opac-err. Any pointers?
Comment 3 Marcel de Rooy 2017-08-28 07:13:12 UTC
(In reply to Katrin Fischer from comment #2)
> Same here:
> Tried to test this, but was not able to make the warn show in the logs on
> kohadevbox. Checked koha-plack-err and koha-opac-err. Any pointers?

Hmm. I see that I have some items where itype=NULL. Which is sufficient to trigger these warns. May not be wide spread, but these tests do not hurt.
Comment 4 Katrin Fischer 2017-09-05 21:15:11 UTC
Created attachment 66857 [details] [review]
Bug 18921: Resolve a few warnings in C4/XSLT.pm

Resolves warnings like:

Use of uninitialized value in hash element at C4/XSLT.pm line 262.
Use of uninitialized value in numeric eq (==) at C4/XSLT.pm line 267.
Use of uninitialized value $status in concatenation (.) or string at C4/XSLT.pm line 300.

Note: Line numbers are not exactly the same anymore.

Test plan:
[1] Enable XSLT view in OPAC
[2] Without this patch, you will probably have some of these warnings when
    doing some opac searches.
[3] Apply this patch. Check the logs again.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 5 Marcel de Rooy 2017-09-06 11:03:33 UTC
(In reply to Katrin Fischer from comment #4)
> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Thanks.
Comment 6 Jonathan Druart 2017-09-07 17:35:23 UTC
Created attachment 66956 [details] [review]
Bug 18921: Resolve a few warnings in C4/XSLT.pm

Resolves warnings like:

Use of uninitialized value in hash element at C4/XSLT.pm line 262.
Use of uninitialized value in numeric eq (==) at C4/XSLT.pm line 267.
Use of uninitialized value $status in concatenation (.) or string at C4/XSLT.pm line 300.

Note: Line numbers are not exactly the same anymore.

Test plan:
[1] Enable XSLT view in OPAC
[2] Without this patch, you will probably have some of these warnings when
    doing some opac searches.
[3] Apply this patch. Check the logs again.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 7 Jonathan Druart 2017-09-07 18:07:06 UTC
Pushed to master for 17.11, thanks to everybody involved!
Comment 8 Fridolin Somers 2017-09-12 12:44:19 UTC
Pushed to 17.05.x, will be in 17.05.04

Hunting those useless logs really important.
Comment 9 Katrin Fischer 2017-09-15 22:54:43 UTC
This patch has been pushed to 16.11.x and will be in 16.11.12.
Comment 10 Mason James 2017-11-23 21:22:03 UTC
Pushed to 16.05.x, for 16.05.17 release