Bug 6720 follow-up: fix error when auth has been deleted
authorJared Camins-Esakov <jcamins@cpbibliography.com>
Thu, 2 Aug 2012 13:18:39 +0000 (09:18 -0400)
committerPaul Poulain <paul.poulain@biblibre.com>
Thu, 2 Aug 2012 13:40:06 +0000 (15:40 +0200)
Thanks to Paul Poulain for finding the problem and proposing a solution.

Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
C4/AuthoritiesMarc.pm

index ece46a3..bcdbf84 100644 (file)
@@ -354,7 +354,7 @@ sub SearchAuthorities {
                 my $thisauthtype = GetAuthType(GetAuthTypeCode($authid));
                 $newline{authtype}     = defined ($thisauthtype) ?
                                             $thisauthtype->{'authtypetext'} :
-                                            GetAuthType($authtypecode)->{'authtypetext'};
+                                            (GetAuthType($authtypecode) ? $_->{'authtypetext'} : '');
                 $newline{summary}      = $summary;
                 $newline{even}         = $counter % 2;
                 $newline{reported_tag} = $reported_tag;