From 0e53c5539bd71f0f938eb8d176d0a5ce5fec4bfc Mon Sep 17 00:00:00 2001 From: Galen Charlton Date: Mon, 12 Nov 2007 17:13:47 -0600 Subject: [PATCH] bugfix: do not crash when searching 'default' (all) heading types Signed-off-by: Chris Cormack Signed-off-by: Joshua Ferraro --- C4/AuthoritiesMarc.pm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/C4/AuthoritiesMarc.pm b/C4/AuthoritiesMarc.pm index 92c7fafe67..d0af4e64b4 100644 --- a/C4/AuthoritiesMarc.pm +++ b/C4/AuthoritiesMarc.pm @@ -653,7 +653,8 @@ sub GetAuthType { my ($authtypecode) = @_; my $dbh=C4::Context->dbh; my $sth; - if ($authtypecode){ + if (defined $authtypecode){ # NOTE - in MARC21 framework, '' is a valid authority + # type $sth=$dbh->prepare("select * from auth_types where authtypecode=?"); $sth->execute($authtypecode); } else { @@ -917,7 +918,7 @@ sub BuildSummary{ foreach my $field ($record->field('5..')) { $altheading.= "
      see also: ".$field->as_string(); } - $summary .= ": "; + $summary .= ": " if $summary; $summary.=$heading.$seeheading.$altheading; } } -- 2.39.5