Bug 29858 - Item.pm "Use of uninitialized value" warn when $field var is NULL
Summary: Item.pm "Use of uninitialized value" warn when $field var is NULL
Status: Failed QA
Alias: None
Product: Koha
Classification: Unclassified
Component: OPAC (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Peter Vashchuk
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-01-12 11:13 UTC by Peter Vashchuk
Modified: 2022-02-19 20:28 UTC (History)
2 users (show)

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


Attachments
Bug 29858: NULL $field var causing "Use of uninitialized value" warn (959 bytes, patch)
2022-01-12 11:14 UTC, Peter Vashchuk
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
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?