Bugzilla – Attachment 168223 Details for
Bug 36976
Warning 'Argument "" isn't numeric in numeric' in log when merging bibliographic records
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 36976: Warning 'Argument "" isn't numeric in numeric' in log when merging bibliographic records
Bug-36976-Warning-Argument--isnt-numeric-in-numeri.patch (text/plain), 2.02 KB, created by
Marcel de Rooy
on 2024-06-28 07:14:39 UTC
(
hide
)
Description:
Bug 36976: Warning 'Argument "" isn't numeric in numeric' in log when merging bibliographic records
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2024-06-28 07:14:39 UTC
Size:
2.02 KB
patch
obsolete
>From bd3baae5f51fd1121abcec222e50f6a33bf530a9 Mon Sep 17 00:00:00 2001 >From: Janusz Kaczmarek <januszop@gmail.com> >Date: Tue, 28 May 2024 12:42:20 +0000 >Subject: [PATCH] Bug 36976: Warning 'Argument "" isn't numeric in numeric' in > log when merging bibliographic records >Content-Type: text/plain; charset=utf-8 > >When merging bibliographic records, Koha generates warning: > >[WARN] Argument "" isn't numeric in numeric ge (>=) at /kohadevbox/koha/Koha/Util/MARC.pm line 81. > >in [plack-]intranet-error.log. > >This is because $tagslib->{$fieldtag}->{'tab'} -- for a tag, not for a >subfield --is (always?) an empty string (cf. >C4::Biblio::GetMarcStructure : $res->{$tag}->{tab} = ""), and in >Koha::Util::MARC::createMergeHash it is compared numerically with 0. > >Test plan: >========== >1. From biblio search result page, selact two records with the checkboxes > and start a merge (Edit -> Merge records). Proceed with merging. > After the merge, controll the content of the plack-intranet-error.log > (when using plack -- standard in ktd). Note the lines: > [WARN] Argument "" isn't numeric in numeric ge (>=) at /kohadevbox/koha/Koha/Util/MARC.pm line 81. >2. Apply the patch; restart_all. >3. Repeat p. 1. There should be no fresh warnings. > >Sponsored-by: Ignatianum University in Cracow >Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl> > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >--- > Koha/Util/MARC.pm | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/Koha/Util/MARC.pm b/Koha/Util/MARC.pm >index 8fb147e4b6..d3963e6e58 100644 >--- a/Koha/Util/MARC.pm >+++ b/Koha/Util/MARC.pm >@@ -82,7 +82,7 @@ sub createMergeHash { > ( > !defined($tagslib) || ( defined $tagslib->{$fieldtag} > && defined $tagslib->{$fieldtag}->{'tab'} >- && $tagslib->{$fieldtag}->{'tab'} >= 0 ) >+ && ( $tagslib->{$fieldtag}->{'tab'} ? $tagslib->{$fieldtag}->{'tab'} : 0 ) >= 0 ) > ) > && @subfield_array > ) >-- >2.30.2
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 36976
:
167222
|
167228
| 168223