From 74a76e539df063ee83f620eba1e75c4659268334 Mon Sep 17 00:00:00 2001 From: Ryan Higgins Date: Fri, 28 Dec 2007 11:41:32 -0600 Subject: [PATCH] Fix fatal error on authority search when biblioaddauthority syspref is set. Signed-off-by: Joshua Ferraro --- cataloguing/addbiblio.pl | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cataloguing/addbiblio.pl b/cataloguing/addbiblio.pl index 814551c4cc..fc25bc71e7 100755 --- a/cataloguing/addbiblio.pl +++ b/cataloguing/addbiblio.pl @@ -682,6 +682,10 @@ AND (authtypecode IS NOT NULL AND authtypecode<>\"\")|); map {$query.= ' and he,ext="'.$_->[1].'"' if ($_->[0]=~/[A-z]/)} $field->subfields(); my ($error,$results)=SimpleSearch($query,"authorityserver"); # there is only 1 result + if ( $error ) { + warn "BIBLIOADDSAUTHORITIES: $error"; + return (0,0) ; + } if ($results && scalar(@$results)==1) { my $marcrecord = MARC::File::USMARC::decode($results->[0]); $field->add_subfields('9'=>$marcrecord->field('001')->data); -- 2.39.5