From d83ca6fedf7bcb64e4a05133929fefab859c51d8 Mon Sep 17 00:00:00 2001 From: Henri-Damien LAURENT Date: Fri, 13 Nov 2009 16:38:49 +0100 Subject: [PATCH] Adding a test in C4::Charset in UNIMARC_Encoding --- C4/Charset.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/C4/Charset.pm b/C4/Charset.pm index 496033f188..e1b6c96efa 100644 --- a/C4/Charset.pm +++ b/C4/Charset.pm @@ -257,7 +257,7 @@ sub SetMarcUnicodeFlag { my $string; my ($subflength,$encodingposition)=($marc_flavour=~/AUTH/?(21,9):(36,22)); $string=$marc_record->subfield( 100, "a" ); - if (length($string)==$subflength) { + if (defined $string && length($string)==$subflength) { $string = substr $string, 0,$subflength if (length($string)>$subflength); } else { -- 2.39.5