added autocomplete="off"
[koha.git] / C4 / Heading.pm
index 643d820..ba9d23f 100644 (file)
@@ -24,6 +24,7 @@ use MARC::Field;
 use C4::Context;
 use C4::Heading::MARC21;
 use C4::Search;
+use Carp;
 
 our $VERSION = 3.00;
 
@@ -109,6 +110,9 @@ sub authorities {
     my $query = qq(Match-heading,do-not-truncate,ext="$self->{'search_form'}");
     $query .= $self->_query_limiters();
     my ($error, $results, $total_hits) = SimpleSearch( $query, undef, undef, [ "authorityserver" ] );
+    if (defined $error) {
+        carp "Error:$error from search $query";
+    }
     return $results;
 }
 
@@ -126,6 +130,9 @@ sub preferred_authorities {
     my $query = "Match-heading-see-from,do-not-truncate,ext='$self->{'search_form'}'";
     $query .= $self->_query_limiters();
     my ($error, $results, $total_hits) = SimpleSearch( $query, undef, undef, [ "authorityserver" ] );
+    if (defined $error) {
+        carp "Error:$error from search $query";
+    }
     return $results;
 }