From 9f26ad1b6f92222303dfd139d61be7307b42c605 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Demians?= Date: Tue, 5 Jan 2016 12:47:31 +0100 Subject: [PATCH] Bug 15470: Error when adding new authority with Default framework TO TEST: 1. Authorities > New authority > Default 2. You get: Can't call method "authtypetext" on an undefined value at 3. Apply the patch and repeat 1 --- authorities/authorities.pl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/authorities/authorities.pl b/authorities/authorities.pl index 2eba66e..d70e2e5 100755 --- a/authorities/authorities.pl +++ b/authorities/authorities.pl @@ -661,13 +661,15 @@ if ($op eq "duplicate") } my $authority_types = Koha::Authority::Types->search( {}, { order_by => ['authtypetext'] } ); +my $authtypetext = $authority_types->find($authtypecode); +$authtypetext = $authtypetext->authtypetext if $authtypetext; $template->param( authority_types => $authority_types, authtypecode => $authtypecode, authid => $authid, linkid => $linkid, - authtypetext => $authority_types->find($authtypecode)->authtypetext, + authtypetext => $authtypetext, hide_marc => C4::Context->preference('hide_marc'), ); output_html_with_http_headers $input, $cookie, $template->output; -- 2.6.2