Bug 18921

Summary: Resolve a few warnings in C4/XSLT.pm
Product: Koha Reporter: Marcel de Rooy <m.de.rooy>
Component: Architecture, internals, and plumbingAssignee: Marcel de Rooy <m.de.rooy>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: trivial    
Priority: P5 - low CC: fridolin.somers, mtj
Version: unspecifiedKeywords: Academy
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Trivial patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:
Attachments: Bug 18921: Resolve a few warnings in C4/XSLT.pm
Bug 18921: Resolve a few warnings in C4/XSLT.pm
Bug 18921: Resolve a few warnings in C4/XSLT.pm

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