From ce152a2f53bce8916602e9429af0e58b765a7c58 Mon Sep 17 00:00:00 2001 From: tipaul Date: Sun, 20 Mar 2005 21:18:48 +0000 Subject: [PATCH] bugfix : don't try to get ->data if 001 field is undefined, or you'll get a 'internal server error' --- value_builder/unimarc_field_4XX.pl | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/value_builder/unimarc_field_4XX.pl b/value_builder/unimarc_field_4XX.pl index 055f7d6840..03aaa0d447 100755 --- a/value_builder/unimarc_field_4XX.pl +++ b/value_builder/unimarc_field_4XX.pl @@ -99,10 +99,11 @@ sub plugin { #warn "bibid :".$bibid; #get marc record $marcrecord = MARCgetbiblio($dbh,$bibid); - warn "record : ".$marcrecord->as_formatted; +# warn "record : ".$marcrecord->as_formatted; my $subfield_value_9=$bibid; - my $subfield_value_0=$marcrecord->field('001')->data; + my $subfield_value_0; + $subfield_value_0=$marcrecord->field('001')->data if $marcrecord->field; my $subfield_value_a; if ($marcrecord->field('200')){ $subfield_value_a=$marcrecord->field('200')->subfield("f"); -- 2.39.5