From 2bb3392156e4314b948c39e4037c1c1662240f6a Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Mon, 5 Feb 2018 17:17:11 -0300 Subject: [PATCH] Bug 20144: [sql_modes] Fix default value for statistics.itemnumber Must be an integer, not empty string Fix for: Incorrect integer value: '' for column 'itemnumber' Signed-off-by: Josef Moravec Signed-off-by: Julian Maurice Signed-off-by: Jonathan Druart --- C4/Stats.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/C4/Stats.pm b/C4/Stats.pm index 86096bffdd..4b1b82a4ce 100644 --- a/C4/Stats.pm +++ b/C4/Stats.pm @@ -119,7 +119,7 @@ sub UpdateStats { my $branch = $params->{branch}; my $type = $params->{type}; my $borrowernumber = exists $params->{borrowernumber} ? $params->{borrowernumber} : ''; - my $itemnumber = exists $params->{itemnumber} ? $params->{itemnumber} : ''; + my $itemnumber = exists $params->{itemnumber} ? $params->{itemnumber} : undef; my $amount = exists $params->{amount} ? $params->{amount} : 0; my $other = exists $params->{other} ? $params->{other} : ''; my $itemtype = exists $params->{itemtype} ? $params->{itemtype} : ''; -- 2.39.5