Browse Source

bugfix : don't try to get ->data if 001 field is undefined, or you'll get a 'internal server error'

3.0.x
tipaul 18 years ago
parent
commit
ce152a2f53
  1. 5
      value_builder/unimarc_field_4XX.pl

5
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");

Loading…
Cancel
Save