@@ -, +, @@ an authority if zebra's index is not up-to-date Bug 15381: Remove GetAuthType and GetAuthTypeCode --- C4/AuthoritiesMarc.pm | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) --- a/C4/AuthoritiesMarc.pm +++ a/C4/AuthoritiesMarc.pm @@ -302,7 +302,13 @@ sub SearchAuthorities { } } - my $thisauthtypecode = Koha::Authorities->find($authid)->authtypecode; + my $authority = Koha::Authorities->find($authid); + unless ( $authority ) { + # The authority does not exist in the DB: Zebra's index is outdated + $counter++; + next; + } + my $thisauthtypecode = $authority->authtypecode; my $thisauthtype = Koha::Authority::Types->find($thisauthtypecode); unless (defined $thisauthtype) { $thisauthtypecode = $authtypecode; --