Bugzilla – Attachment 80886 Details for
Bug 21606
Issues with matching rules
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 21606: [sql_modes] Fix matching rules insert
Bug-21606-sqlmodes-Fix-matching-rules-insert.patch (text/plain), 1.54 KB, created by
Jonathan Druart
on 2018-10-18 22:28:46 UTC
(
hide
)
Description:
Bug 21606: [sql_modes] Fix matching rules insert
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2018-10-18 22:28:46 UTC
Size:
1.54 KB
patch
obsolete
>From a9f2f2442dfff240a9c565d1d92d5773b058e2df Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Thu, 18 Oct 2018 19:27:21 -0300 >Subject: [PATCH] Bug 21606: [sql_modes] Fix matching rules insert > >Fix: >Incorrect integer value: '' for column 'offset' >Incorrect integer value: '' for column 'score' > >Test plan: >Add/edit matching rules >--- > C4/Matcher.pm | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > >diff --git a/C4/Matcher.pm b/C4/Matcher.pm >index 5a62c055e4..d19dd64b2f 100644 >--- a/C4/Matcher.pm >+++ b/C4/Matcher.pm >@@ -331,7 +331,7 @@ sub _store_matchpoint { > my $matcher_id = $self->{'id'}; > $sth = $dbh->prepare_cached("INSERT INTO matchpoints (matcher_id, search_index, score) > VALUES (?, ?, ?)"); >- $sth->execute($matcher_id, $matchpoint->{'index'}, $matchpoint->{'score'}); >+ $sth->execute($matcher_id, $matchpoint->{'index'}, $matchpoint->{'score'}||0); > my $matchpoint_id = $dbh->{'mysql_insertid'}; > my $seqnum = 0; > foreach my $component (@{ $matchpoint->{'components'} }) { >@@ -343,7 +343,7 @@ sub _store_matchpoint { > $sth->bind_param(2, $seqnum); > $sth->bind_param(3, $component->{'tag'}); > $sth->bind_param(4, join "", sort keys %{ $component->{'subfields'} }); >- $sth->bind_param(5, $component->{'offset'}); >+ $sth->bind_param(5, $component->{'offset'}||0); > $sth->bind_param(6, $component->{'length'}); > $sth->execute(); > my $matchpoint_component_id = $dbh->{'mysql_insertid'}; >-- >2.11.0
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 21606
:
80886
|
81860