From b0ec355514692d267d22d130e77bac22d512f3f1 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 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. Signed-off-by: David Nind Signed-off-by: Nick Clemens Signed-off-by: Jonathan Druart --- 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 14b51d2ba1..b22a11bea1 100755 --- a/opac/opac-MARCdetail.pl +++ b/opac/opac-MARCdetail.pl @@ -321,7 +321,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.39.5