Bugzilla – Attachment 161389 Details for
Bug 35833
Fix few noisy warnings from C4/Koha and search
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 35833: Fix warnings from C4/Koha
Bug-35833-Fix-warnings-from-C4Koha.patch (text/plain), 1.69 KB, created by
Jonathan Druart
on 2024-01-25 10:53:32 UTC
(
hide
)
Description:
Bug 35833: Fix warnings from C4/Koha
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2024-01-25 10:53:32 UTC
Size:
1.69 KB
patch
obsolete
>From b557a47a5aae2c050f03d25cc094db1721ba9906 Mon Sep 17 00:00:00 2001 >From: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Date: Thu, 18 Jan 2024 14:39:55 +0100 >Subject: [PATCH] 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> >--- > C4/Koha.pm | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > >diff --git a/C4/Koha.pm b/C4/Koha.pm >index 081d87659be..41b6003de49 100644 >--- a/C4/Koha.pm >+++ b/C4/Koha.pm >@@ -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; > } > } >-- >2.34.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 35833
:
161136
|
161138
| 161389 |
161390