From 3f69f6e1c8738564c30d613d245ea8af5f6b91fd Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Tue, 6 Feb 2018 14:49:47 -0300 Subject: [PATCH] Bug 20144: [sql_modes] Set subscription.numberlength and weeklength to NULL if not passed Fix for: Incorrect integer value: '' for column 'numberlength' Incorrect integer value: '' for column 'weeklength' t/db_dependent/Serials/ReNewSubscription.t Signed-off-by: Josef Moravec Signed-off-by: Julian Maurice Signed-off-by: Jonathan Druart --- C4/Serials.pm | 3 +++ 1 file changed, 3 insertions(+) diff --git a/C4/Serials.pm b/C4/Serials.pm index 0d10b25191..ac21dad49b 100644 --- a/C4/Serials.pm +++ b/C4/Serials.pm @@ -1530,6 +1530,9 @@ sub ReNewSubscription { ); } + $numberlength ||= 0; # Should not we raise an exception instead? + $weeklength ||= 0; + # renew subscription $query = qq| UPDATE subscription -- 2.39.5