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 <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 4e2c74fced)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This commit is contained in:
Fridolin Somers 2019-04-17 13:58:57 +02:00 committed by Martin Renvoize
parent b2f9cfe452
commit 4863e59c57
No known key found for this signature in database
GPG Key ID: 422B469130441A0F
1 changed files with 2 additions and 1 deletions

View File

@ -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,