Bugzilla – Attachment 88969 Details for
Bug 21036
Fix a bunch of older warnings
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 21036: Remove odd number of elements warnings from AuthoritiesMarc.pm
Bug-21036-Remove-odd-number-of-elements-warnings-f.patch (text/plain), 2.91 KB, created by
Bouzid Fergani
on 2019-04-26 20:29:11 UTC
(
hide
)
Description:
Bug 21036: Remove odd number of elements warnings from AuthoritiesMarc.pm
Filename:
MIME Type:
Creator:
Bouzid Fergani
Created:
2019-04-26 20:29:11 UTC
Size:
2.91 KB
patch
obsolete
>From 9ddaab2fc01ea4c3039912f9bf8acba55b0ff48d Mon Sep 17 00:00:00 2001 >From: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Date: Thu, 5 Jul 2018 12:10:26 +0200 >Subject: [PATCH] Bug 21036: Remove odd number of elements warnings from > AuthoritiesMarc.pm > >Like this one (16.11 line number): >Odd number of elements in anonymous hash at C4/AuthoritiesMarc.pm line 1070. > >We need to add a scalar to some MARC::Field::subfield calls. In list context >an empty list returned affects the hash built around it. > >Test plan: >Could reproduce this warning easily from OPAC authority search. >opac-authorities-home.pl calling BuildSummary. > >Signed-off-by: Bouzid Fergani <bouzid.fergani@inlibro.com> >--- > C4/AuthoritiesMarc.pm | 10 +++++----- > 1 file changed, 5 insertions(+), 5 deletions(-) > >diff --git a/C4/AuthoritiesMarc.pm b/C4/AuthoritiesMarc.pm >index 10c67fc..0d90b37 100644 >--- a/C4/AuthoritiesMarc.pm >+++ b/C4/AuthoritiesMarc.pm >@@ -994,14 +994,14 @@ sub BuildSummary { > if ($type eq 'subfi') { > push @seefrom, { > heading => $field->as_string($marc21subfields), >- hemain => $field->subfield( substr($marc21subfields, 0, 1) ), >+ hemain => scalar $field->subfield( substr($marc21subfields, 0, 1) ), > type => ($field->subfield('i') || ''), > field => $field->tag(), > }; > } else { > push @seefrom, { > heading => $field->as_string($marc21subfields), >- hemain => $field->subfield( substr($marc21subfields, 0, 1) ), >+ hemain => scalar $field->subfield( substr($marc21subfields, 0, 1) ), > type => $type, > field => $field->tag(), > }; >@@ -1017,8 +1017,8 @@ sub BuildSummary { > if ($type eq 'subfi') { > push @seealso, { > heading => $field->as_string($marc21subfields), >- hemain => $field->subfield( substr($marc21subfields, 0, 1) ), >- type => $field->subfield('i'), >+ hemain => scalar $field->subfield( substr($marc21subfields, 0, 1) ), >+ type => scalar $field->subfield('i'), > field => $field->tag(), > search => $field->as_string($marc21subfields) || '', > authid => $field->subfield('9') || '' >@@ -1026,7 +1026,7 @@ sub BuildSummary { > } else { > push @seealso, { > heading => $field->as_string($marc21subfields), >- hemain => $field->subfield( substr($marc21subfields, 0, 1) ), >+ hemain => scalar $field->subfield( substr($marc21subfields, 0, 1) ), > type => $type, > field => $field->tag(), > search => $field->as_string($marc21subfields) || '', >-- >2.7.4
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 21036
:
76686
|
76689
|
76702
|
76703
|
76704
|
78455
|
78456
|
88969
|
89164
|
89165
|
89166