Bug 32151

Summary: [WARN] Use of uninitialized value in numeric ne (!=) at C4/Ris.pm line 834.
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    
Version: Main   
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:
22.11.00
Attachments: Bug 32151: Resolve uninitialized warn in numeric ne in C4::Ris
Bug 32151: Resolve uninitialized warn in numeric ne in C4::Ris

Description Marcel de Rooy 2022-11-09 15:11:26 UTC
Line 834 (21.11) shows the ugly:
    if ($kwfield != undef) {

Master same line.
Comment 1 Marcel de Rooy 2022-11-09 15:16:31 UTC
Created attachment 143519 [details] [review]
Bug 32151: Resolve uninitialized warn in numeric ne in C4::Ris

We should not write:
    if ($kwfield != undef) {

Test plan:
Pick record with UTF8 chars.
Download via cart or shelf in RIS format.
Check your logs.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 2 Marcel de Rooy 2022-11-09 15:17:23 UTC
Trivial oneliner. Self SO
Comment 3 Jonathan Druart 2022-11-11 14:20:56 UTC
Created attachment 143790 [details] [review]
Bug 32151: Resolve uninitialized warn in numeric ne in C4::Ris

We should not write:
    if ($kwfield != undef) {

Test plan:
Pick record with UTF8 chars.
Download via cart or shelf in RIS format.
Check your logs.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 4 Tomás Cohen Arazi 2022-11-11 17:33:18 UTC
Pushed to master for 22.11.

Nice work everyone, thanks!