From cf9fd1f77ac51da569b1bdc71119038fdbab72d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?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 --- C4/AuthoritiesMarc.pm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/C4/AuthoritiesMarc.pm b/C4/AuthoritiesMarc.pm index a2e01e5..43c5faf 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.6.2