adding eval to fix 500 error with blank marc record

This commit is contained in:
kados 2006-04-01 23:06:22 +00:00
parent 78ab7cd0b6
commit ea32a21f7f

View file

@ -498,8 +498,11 @@ if ($op eq "addbiblio") {
$biblionumber= ""; $biblionumber= "";
} }
#FIXME: it's kind of silly to go from MARC::Record to MARC::File::XML and then back again just to fix the encoding #FIXME: it's kind of silly to go from MARC::Record to MARC::File::XML and then back again just to fix the encoding
eval {
my $uxml = $record->as_xml; my $uxml = $record->as_xml;
my $urecord = MARC::Record::new_from_xml($uxml, 'UTF-8'); my $urecord = MARC::Record::new_from_xml($uxml, 'UTF-8');
$record = $urecord;
};
build_tabs ($template, $record, $dbh,$encoding); build_tabs ($template, $record, $dbh,$encoding);
build_hidden_data; build_hidden_data;
$template->param( $template->param(