Bugzilla – Attachment 129344 Details for
Bug 29690
Software error in details.pl when invalid MARCXML
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 29690: (follow-up) Add eval on metadata record fetch in get_marc_authors()
Bug-29690-follow-up-Add-eval-on-metadata-record-fe.patch (text/plain), 1.01 KB, created by
Tomás Cohen Arazi (tcohen)
on 2022-01-12 13:11:26 UTC
(
hide
)
Description:
Bug 29690: (follow-up) Add eval on metadata record fetch in get_marc_authors()
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi (tcohen)
Created:
2022-01-12 13:11:26 UTC
Size:
1.01 KB
patch
obsolete
>From 2762d340ae968133b54d97a36f3699f74618faf8 Mon Sep 17 00:00:00 2001 >From: Fridolin Somers <fridolin.somers@biblibre.com> >Date: Wed, 15 Dec 2021 12:36:17 -1000 >Subject: [PATCH] Bug 29690: (follow-up) Add eval on metadata record fetch in > get_marc_authors() > >Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> >--- > Koha/Biblio.pm | 5 ++++- > 1 file changed, 4 insertions(+), 1 deletion(-) > >diff --git a/Koha/Biblio.pm b/Koha/Biblio.pm >index afecf22ca6..ceae2b1d3d 100644 >--- a/Koha/Biblio.pm >+++ b/Koha/Biblio.pm >@@ -1011,7 +1011,10 @@ sub get_marc_authors { > my @marcauthors; > my $AuthoritySeparator = C4::Context->preference('AuthoritySeparator'); > >- foreach my $field ( $self->metadata->record->field($fields_filter) ) { >+ my $record = eval { $self->metadata->record }; >+ unless ( $record ) { warn $@ ; return } >+ >+ foreach my $field ( $record->field($fields_filter) ) { > next unless $field->tag() >= $mintag && $field->tag() <= $maxtag; > my @subfields_loop; > my @link_loop; >-- >2.32.0
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 29690
:
128484
|
128485
|
128486
|
128487
|
128488
|
128497
|
128530
|
128531
|
128532
|
128533
|
128541
|
128578
|
129339
|
129340
|
129341
|
129342
|
129343
|
129344
|
129345
|
129365
|
129381
|
129382
|
129542
|
129543
|
129730
|
129731