Bugzilla – Attachment 182940 Details for
Bug 40017
Z39.50 search: Allow leader and specific control field positions in Additional fields
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 40017: (follow-up) More rigorous checking
Bug-40017-follow-up-More-rigorous-checking.patch (text/plain), 1.69 KB, created by
David Nind
on 2025-06-04 11:03:11 UTC
(
hide
)
Description:
Bug 40017: (follow-up) More rigorous checking
Filename:
MIME Type:
Creator:
David Nind
Created:
2025-06-04 11:03:11 UTC
Size:
1.69 KB
patch
obsolete
>From 5ca37be9b5e4e949e0ff4dc9b54c391df6377af6 Mon Sep 17 00:00:00 2001 >From: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Date: Mon, 2 Jun 2025 11:00:31 +0200 >Subject: [PATCH] Bug 40017: (follow-up) More rigorous checking > >Adding a few checks to resolve the errors David found while >testing. > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Signed-off-by: David Nind <david@davidnind.com> >--- > C4/Breeding.pm | 8 +++++--- > 1 file changed, 5 insertions(+), 3 deletions(-) > >diff --git a/C4/Breeding.pm b/C4/Breeding.pm >index cb6811b0e3..e6c56b99b0 100644 >--- a/C4/Breeding.pm >+++ b/C4/Breeding.pm >@@ -379,10 +379,10 @@ sub _add_custom_field_rowdata { > warn "Breeding: invalid expression in AdditionalFieldsInZ3950Result(Auth)Search: $field"; > next; > } elsif ( $tag eq '000' ) { >- push @content, ( _extract_positions( $record->leader, $add_spec ) ); >+ push @content, ( _extract_positions( $record->leader, $add_spec ) ) if $record->leader; > } elsif ( $tag =~ /^00\d$/ ) { # control field > my $marcfield = $record->field($tag); >- push @content, ( _extract_positions( $marcfield->data, $add_spec ) ); >+ push @content, ( _extract_positions( $marcfield->data, $add_spec ) ) if $marcfield; > } else { > for my $marcfield ( $record->field($tag) ) { > foreach my $subfield ( $marcfield->subfields ) { >@@ -402,7 +402,9 @@ sub _add_custom_field_rowdata { > > sub _extract_positions { > my ( $data, $spec ) = @_; >- if ( !$spec ) { >+ if ( !defined($data) ) { >+ return; >+ } elsif ( !$spec ) { > return $data; > } elsif ( $spec =~ /p(\d+)$/ ) { > my $pos = $1; >-- >2.39.5
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 40017
:
182821
|
182902
|
182939
| 182940