Bugzilla – Attachment 89166 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.98 KB, created by
Martin Renvoize (ashimema)
on 2019-05-01 09:43:20 UTC
(
hide
)
Description:
Bug 21036: Remove odd number of elements warnings from AuthoritiesMarc.pm
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2019-05-01 09:43:20 UTC
Size:
2.98 KB
patch
obsolete
>From e6c9615721d2fc90b9b6bbc6bc3bae6b713b2ebf 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> >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> >--- > C4/AuthoritiesMarc.pm | 10 +++++----- > 1 file changed, 5 insertions(+), 5 deletions(-) > >diff --git a/C4/AuthoritiesMarc.pm b/C4/AuthoritiesMarc.pm >index 10c67fc9ff..0d90b37d67 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.20.1
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