From c6f06de4e164117e79e1b496ea75fb0ee7b89561 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 --- 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.14.2