=item GetMandatoryFieldZ3950
- This function return an hashref which containts all mandatory field
+ This function return an hashref which contains all mandatory field
to search with z3950 server.
=cut
my $authority_types = Koha::Authority::Types->search( {}, { order_by => ['authtypetext'] } );
+my $type = $authority_types->find($authtypecode);
$template->param(
authority_types => $authority_types,
authtypecode => $authtypecode,
authid => $authid,
linkid => $linkid,
- authtypetext => $authority_types->find($authtypecode)->authtypetext,
+ authtypetext => $type ? $type->authtypetext : "",
hide_marc => C4::Context->preference('hide_marc'),
);
output_html_with_http_headers $input, $cookie, $template->output;