Bugzilla – Attachment 167025 Details for
Bug 36917
Many warnings from t/db_dependent/Authority/Merge.t
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 36917: Remove some warnings from t/db_dependent/Authority/Merge.t
Bug-36917-Remove-some-warnings-from-tdbdependentAu.patch (text/plain), 2.09 KB, created by
Nick Clemens (kidclamp)
on 2024-05-22 12:02:53 UTC
(
hide
)
Description:
Bug 36917: Remove some warnings from t/db_dependent/Authority/Merge.t
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2024-05-22 12:02:53 UTC
Size:
2.09 KB
patch
obsolete
>From 4f4b200e7e7cd1bb38710645197f9f70968df08a Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Wed, 22 May 2024 10:56:10 +0200 >Subject: [PATCH] Bug 36917: Remove some warnings from > t/db_dependent/Authority/Merge.t > >Cannot determine authority type for record: 1709 at /kohadevbox/koha/Koha/SearchEngine/Elasticsearch.pm line 589. >Use of uninitialized value $subfields in pattern match (m//) at /kohadevbox/koha/C4/Heading/MARC21.pm line 412. >Use of uninitialized value $subfields in pattern match (m//) at /kohadevbox/koha/C4/Heading/MARC21.pm line 448. > >This change removes the 2 "Use of uninitialized value $subfields in >pattern match (m//)" warnings > >The warnings are gnerated because the subfields for headings are hardcoded variables in C4::Heading::MARC21 >for any genuine authority record we should receive the correct list of subfields. The tests in this case are >mocking a new authtype, and so do not find the correct subfields. Skipping the generation here silences the >warnings and will prevent user defined types from throwing errors as well. > >NOTE: Koha allows the user to define their own authority types, however, we have various features hardcoded >that will prevent them from working as expected > >WNC amended commit message > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Signed-off-by: Nick Clemens <nick@bywatersolutions.com> >--- > C4/Heading/MARC21.pm | 2 ++ > 1 file changed, 2 insertions(+) > >diff --git a/C4/Heading/MARC21.pm b/C4/Heading/MARC21.pm >index cb422d5c119..4f747d7f92c 100644 >--- a/C4/Heading/MARC21.pm >+++ b/C4/Heading/MARC21.pm >@@ -402,6 +402,7 @@ sub _get_search_heading { > my $subfields = shift; > > my $heading = ""; >+ return $heading unless $subfields; > my @subfields = $field->subfields(); > my $first = 1; > for ( my $i = 0 ; $i <= $#subfields ; $i++ ) { >@@ -439,6 +440,7 @@ sub _get_display_heading { > my $subfields = shift; > > my $heading = ""; >+ return $heading unless $subfields; > my @subfields = $field->subfields(); > my $first = 1; > for ( my $i = 0 ; $i <= $#subfields ; $i++ ) { >-- >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 36917
:
167012
|
167023
| 167025 |
167026
|
167027
|
167033
|
167034
|
167154
|
167155