From 8072a3ef4bdd3eae5e9906077392fddf2a5b424c Mon Sep 17 00:00:00 2001 From: Marcel de Rooy Date: Thu, 10 Jun 2021 14:02:16 +0000 Subject: [PATCH] Bug 28545: Noisy uninitialized warn at opac-MARCdetail.pl line 313 Content-Type: text/plain; charset=utf-8 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 Without the patch I had at least four warnings per item: withdrawn, lost, damaged and notforloan. --- opac/opac-MARCdetail.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/opac/opac-MARCdetail.pl b/opac/opac-MARCdetail.pl index 4362270959..bd7f45d3a9 100755 --- a/opac/opac-MARCdetail.pl +++ b/opac/opac-MARCdetail.pl @@ -311,7 +311,7 @@ foreach my $field (@fields) { } else { $item->{ $subf[$i][0] } .= GetAuthorisedValueDesc( $field->tag(), $subf[$i][0], - $subf[$i][1], '', $tagslib, '', 'opac' ); + $subf[$i][1], '', $tagslib, '', 'opac' ) // q{}; } my $kohafield = $tagslib->{ $field->tag() }->{ $subf[$i][0] }->{kohafield}; -- 2.20.1