Bug 35833: Fix warnings from C4/Koha
[2024/01/18 11:52:40] [WARN] Argument " " isn't numeric in numeric eq (==) at /usr/share/koha/C4/Koha.pm line 600. [2024/01/18 11:52:40] [WARN] Argument " " isn't numeric in numeric eq (==) at /usr/share/koha/C4/Koha.pm line 659. Note: According to the code in MARC::Field the indicator returned cannot be undef. So we do not return new uninitialized warnings. Test plan: Check your log before and after patch. Possibly you may need to create a record with spaces as field indicators. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
This commit is contained in:
parent
806ef1899e
commit
857d8f4d82
1 changed files with 2 additions and 2 deletions
|
@ -599,7 +599,7 @@ sub GetNormalizedUPC {
|
|||
foreach my $field (@fields) {
|
||||
my $indicator = $field->indicator(1);
|
||||
my $upc = _normalize_match_point($field->subfield('a'));
|
||||
if ($upc && $indicator == 1 ) {
|
||||
if ($upc && $indicator eq '1' ) {
|
||||
return $upc;
|
||||
}
|
||||
}
|
||||
|
@ -658,7 +658,7 @@ sub GetNormalizedEAN {
|
|||
foreach my $field (@fields) {
|
||||
my $indicator = $field->indicator(1);
|
||||
my $ean = _normalize_match_point($field->subfield('a'));
|
||||
if ( $ean && $indicator == 3 ) {
|
||||
if ( $ean && $indicator eq '3' ) {
|
||||
return $ean;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue