Bug 29858

Summary: Item.pm "Use of uninitialized value" warn when $field var is NULL
Product: Koha Reporter: Peter Vashchuk <stalkernoid>
Component: OPACAssignee: Peter Vashchuk <stalkernoid>
Status: RESOLVED DUPLICATE QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: david, nugged
Version: Main   
Hardware: All   
OS: All   
GIT URL: Change sponsored?: ---
Patch complexity: --- Documentation contact:
Documentation submission: Text to go in the release notes:
Version(s) released in:
Circulation function:
Attachments: Bug 29858: NULL $field var causing "Use of uninitialized value" warn

Description Peter Vashchuk 2022-01-12 11:13:45 UTC

    
Comment 1 Peter Vashchuk 2022-01-12 11:14:37 UTC
Created attachment 129331 [details] [review]
Bug 29858: NULL $field var causing "Use of uninitialized value" warn

Some fields might be null which causes "Use of
uninitialized value in string eq at .../Koha/Item.pm line 639." warn.
This patch prevents this warn to get thrown by checking if the field
is defined first.
Comment 2 David Nind 2022-02-05 22:41:08 UTC
Happy to test if you could provide the steps to set things up so that the warning is generated.
Comment 3 Katrin Fischer 2022-02-19 20:28:45 UTC
Hi Peter, can you please provide a test plan?
Comment 4 Peter Vashchuk 2025-01-20 12:44:39 UTC

*** This bug has been marked as a duplicate of bug 33188 ***