Bug 28545 - Noisy uninitialized warn at opac-MARCdetail.pl line 313
Summary: Noisy uninitialized warn at opac-MARCdetail.pl line 313
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: OPAC (show other bugs)
Version: Main
Hardware: All All
: P5 - low minor (vote)
Assignee: Marcel de Rooy
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks: 25790
  Show dependency treegraph
 
Reported: 2021-06-10 14:01 UTC by Marcel de Rooy
Modified: 2022-12-12 21:25 UTC (History)
4 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
This removes "..Use of uninitialized value in concatenation (.) or string at.." warning messages from the plack-opac-error.log when accessing the MARC view page for a record in the OPAC.
Version(s) released in:
21.11.00,21.05.02,20.11.08


Attachments
Bug 28545: Noisy uninitialized warn at opac-MARCdetail.pl line 313 (1.22 KB, patch)
2021-06-10 14:04 UTC, Marcel de Rooy
Details | Diff | Splinter Review
Bug 28545: Noisy uninitialized warn at opac-MARCdetail.pl line 313 (1.33 KB, patch)
2021-06-11 07:51 UTC, Marcel de Rooy
Details | Diff | Splinter Review
Bug 28545: Noisy uninitialized warn at opac-MARCdetail.pl line 313 (1.34 KB, patch)
2021-06-12 22:51 UTC, David Nind
Details | Diff | Splinter Review
Bug 28545: Noisy uninitialized warn at opac-MARCdetail.pl line 313 (1.39 KB, patch)
2021-06-18 15:38 UTC, Nick Clemens
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 2021-06-10 14:01:49 UTC
19.11 warning like: Use of uninitialized value in concatenation (.) or string at /usr/share/koha/opac/opac-MARCdetail.pl line 312.
Same code, line 313 in master.
Trivial fix.
Comment 1 Marcel de Rooy 2021-06-10 14:04:13 UTC
Created attachment 121794 [details] [review]
Bug 28545: Noisy uninitialized warn at opac-MARCdetail.pl line 313

Test plan:
You need an item with some null values.
Check your logs before and after applying this change.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 2 Marcel de Rooy 2021-06-11 07:51:11 UTC
Created attachment 121810 [details] [review]
Bug 28545: Noisy uninitialized warn at opac-MARCdetail.pl line 313

Test plan:
You do not even need a NULL value in a authorised value controlled
item field, a zero in damaged or withdrawn is enough to trigger the
warnings. (Because only the 1 is linked to an authvalue.)

Check your plack-opac-error.log before and after applying this change.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Without the patch I had at least four warnings per item: withdrawn,
lost, damaged and notforloan.
Comment 3 David Nind 2021-06-12 22:51:00 UTC
Created attachment 121894 [details] [review]
Bug 28545: Noisy uninitialized warn at opac-MARCdetail.pl line 313

Test plan:
You do not even need a NULL value in a authorised value controlled
item field, a zero in damaged or withdrawn is enough to trigger the
warnings. (Because only the 1 is linked to an authvalue.)

Check your plack-opac-error.log before and after applying this change.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Without the patch I had at least four warnings per item: withdrawn,
lost, damaged and notforloan.

Signed-off-by: David Nind <david@davidnind.com>
Comment 4 Nick Clemens 2021-06-18 15:38:18 UTC
Created attachment 122164 [details] [review]
Bug 28545: Noisy uninitialized warn at opac-MARCdetail.pl line 313

Test plan:
You do not even need a NULL value in a authorised value controlled
item field, a zero in damaged or withdrawn is enough to trigger the
warnings. (Because only the 1 is linked to an authvalue.)

Check your plack-opac-error.log before and after applying this change.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Without the patch I had at least four warnings per item: withdrawn,
lost, damaged and notforloan.

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 5 Jonathan Druart 2021-06-21 10:06:55 UTC
Pushed to master for 21.11, thanks to everybody involved!
Comment 6 Kyle M Hall 2021-07-02 13:05:50 UTC
Pushed to 21.05.x for 21.05.02
Comment 7 Fridolin Somers 2021-07-10 02:48:12 UTC
Note that behavior in staff interface in catalogue/MARCdetail.pl is different :
$item->{ $subf[$i][0] } .= GetAuthorisedValueDesc( $field->tag(), $subf[$i][0], $subf[$i][1], '', $tagslib) || $subf[$i][1];
Comment 8 Fridolin Somers 2021-07-10 02:48:41 UTC
Pushed to 20.11.x for 20.11.08
Comment 9 Victor Grousset/tuxayo 2021-07-11 02:33:39 UTC
Not backported to oldoldstable (20.05.x). Feel free to ask if it's needed.