From 4a34fd2fd31fc98a85021dad22f37605cfae2a5c Mon Sep 17 00:00:00 2001 From: =?utf8?q?Fr=C3=A9d=C3=A9ric=20Demians?= Date: Sun, 20 Dec 2015 17:17:08 +0100 Subject: [PATCH] Bug 15381: Fix error in SearchAuthorities when no authtypecode Signed-off-by: Martin Renvoize Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com --- C4/AuthoritiesMarc.pm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/C4/AuthoritiesMarc.pm b/C4/AuthoritiesMarc.pm index a2e01e596c..43c5faf53e 100644 --- a/C4/AuthoritiesMarc.pm +++ b/C4/AuthoritiesMarc.pm @@ -291,7 +291,9 @@ sub SearchAuthorities { my %newline; $newline{authid} = $authid; if ( !$skipmetadata ) { - my $auth_tag_to_report = Koha::Authority::Types->find($authtypecode)->auth_tag_to_report; + my $auth_tag_to_report; + $auth_tag_to_report = Koha::Authority::Types->find($authtypecode)->auth_tag_to_report + if $authtypecode; my $reported_tag; my $mainentry = $authrecord->field($auth_tag_to_report); if ($mainentry) { -- 2.39.5