From 377af593c44b3c903c493fbe6dca62149ddf70ce Mon Sep 17 00:00:00 2001 From: Fridolin Somers Date: Wed, 17 Apr 2019 13:58:57 +0200 Subject: [PATCH] Bug 22723: Correct syntax error on confess call in Koha/MetadataRecord/Authority.pm In Koha/MetadataRecord/Authority.pm the call to confess is missing string quotes. It may generates this error : Can't locate object method "confess" via package "Empty String at /usr/share/perl5/MARC/File/XML.pm line 448. " (perhaps you forgot to load "Empty String at /usr/share/perl5/MARC/File/XML.pm line 448. "?) at /home/koha/src/Koha/MetadataRecord/Authority.pm line 186. Simply missing double quotes. Also missing use Carp to call confess. Signed-off-by: Kyle M Hall Signed-off-by: Martin Renvoize Signed-off-by: Nick Clemens (cherry picked from commit 4e2c74fced685db861a78fc1aa151dd35ad0d5f2) Signed-off-by: Martin Renvoize (cherry picked from commit 4863e59c5798fda6883c354eeb5096d4609e42bd) Signed-off-by: Lucas Gass --- Koha/MetadataRecord/Authority.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Koha/MetadataRecord/Authority.pm b/Koha/MetadataRecord/Authority.pm index f9eedf8dcc..062d19c961 100644 --- a/Koha/MetadataRecord/Authority.pm +++ b/Koha/MetadataRecord/Authority.pm @@ -33,6 +33,7 @@ Authority data. use strict; use warnings; +use Carp; use C4::Context; use MARC::Record; use MARC::File::XML; @@ -183,7 +184,7 @@ sub get_all_authorities_iterator { ) ); }; - confess $@ if ($@); + confess "$@" if ($@); $record->encoding('UTF-8'); # I'm not sure why we don't use the authtypecode from the database, -- 2.39.5