Bug 19528: Fix a few typos like corrosponding
[koha.git] / authorities / authorities.pl
index 5935b07..55d34d1 100755 (executable)
@@ -320,7 +320,7 @@ sub CreateKey {
 
 =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
@@ -660,12 +660,13 @@ if ($op eq "duplicate")
 
 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;