Bug 36603: (QA follow-up) Resolve two conditional declarations

QA tools reported:
 FAIL   authorities/blinddetail-biblio-search.pl
   FAIL   critic
                # Variables::ProhibitConditionalDeclarations: Got 2 violation(s).

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
This commit is contained in:
Marcel de Rooy 2024-11-01 10:20:43 +00:00 committed by Katrin Fischer
parent b4e0a2ec7f
commit 57aeb9679f
Signed by: kfischer
GPG key ID: 0EF6E2C03357A834

View file

@ -113,9 +113,9 @@ if ($authid) {
# Manual (online ed., 1.0.0, 2023), pp. 350, 363, 385.
if ( C4::Context->preference('marcflavour') eq 'UNIMARC' ) {
my $isnifield = $record->field('010');
my $isnisubfield = $isnifield->subfield('a') if defined $isnifield;
my $isninumber = $isnisubfield
if defined $isnisubfield && ( $auth_type->auth_tag_to_report =~ /^(200|210|220)$/ );
my $isnisubfield = $isnifield ? $isnifield->subfield('a') : undef;
my $isninumber =
defined $isnisubfield && ( $auth_type->auth_tag_to_report =~ /^(200|210|220)$/ ) ? $isnisubfield : undef;
push( @subfield_loop, { marc_subfield => 'o', marc_values => $isninumber } ) if defined $isninumber;
}