Bug 8905: Error when accessing invalid authority
[koha.git] / C4 / AuthoritiesMarc.pm
index dde1c05..114e593 100644 (file)
@@ -856,6 +856,7 @@ Returns MARC::Record of the authority passed in parameter.
 sub GetAuthority {
     my ($authid)=@_;
     my $authority = Koha::Authority->get_from_authid($authid);
+    return unless $authority;
     return ($authority->record);
 }