Bugzilla – Attachment 164826 Details for
Bug 33205
(Bug 28268 follow-up) Method call $row->authid inside quotes - produces meaningless warning
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 33205: (bug 28268 follow-up) Method call $row->authid inside quotes - produces meaningless warning
Bug-33205-bug-28268-follow-up-Method-call-row-auth.patch (text/plain), 1.86 KB, created by
Nick Clemens (kidclamp)
on 2024-04-12 11:16:33 UTC
(
hide
)
Description:
Bug 33205: (bug 28268 follow-up) Method call $row->authid inside quotes - produces meaningless warning
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2024-04-12 11:16:33 UTC
Size:
1.86 KB
patch
obsolete
>From b16c193ed33116170d91175f813edec1366cc6b4 Mon Sep 17 00:00:00 2001 >From: Janusz Kaczmarek <januszop@gmail.com> >Date: Sat, 11 Mar 2023 11:45:32 +0100 >Subject: [PATCH] Bug 33205: (bug 28268 follow-up) Method call $row->authid > inside quotes - produces meaningless warning > >Bug 28268, in >Koha::MetadataRecord::Authority::get_all_authorities_iterator, >introduced a warning: > >warn "Something went wrong reading record for authority $row->authid: $@\n"; > >But a method cannot be called from within quotes in Perl - extrapolation >does not work for functions/methods. So, if something really goes >wrong, this line of code produces a warning like: > >Something went wrong reading record for authority >Koha::Schema::Result::AuthHeader=HASH(0x55cf7e0d0958)->authid: Empty >String at /usr/share/perl5/MARC/File/XML.pm line 450. > >which is not very informative -- authid is missing. > >Test plan >========= >Hard to reproduce. This problem occurs only in rare cases of some weird problem >in stores authority data or if a auth record had been deleted after a ES reindex >action has been initiated. But the problem in the code and the fix seem obvious. > >Signed-off-by: Nick Clemens <nick@bywatersolutions.com> >--- > Koha/MetadataRecord/Authority.pm | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/Koha/MetadataRecord/Authority.pm b/Koha/MetadataRecord/Authority.pm >index d16970a828d..ed0ebfc0169 100644 >--- a/Koha/MetadataRecord/Authority.pm >+++ b/Koha/MetadataRecord/Authority.pm >@@ -209,7 +209,7 @@ sub get_all_authorities_iterator { > > my $auth = __PACKAGE__->get_from_authid($row->authid); > if (!$auth) { >- warn "Something went wrong reading record for authority $row->authid: $@\n"; >+ warn "Something went wrong reading record for authority " . $row->authid . ": $@\n"; > next; > } > return $auth; >-- >2.39.2
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 33205
:
164718
| 164826