Bug 22812: Fix new subscription with strict sql modes
With sql_strict_modes turned on, if you try to create a new subscription you will get: Incorrect integer value: '' for column '$INT_COLUMN' at row 1 Signed-off-by: Liz Rea <wizzyrea@gmail.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Michal Denar <black23@gmail.com> Signed-off-by: Michal Denar <black23@gmail.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
This commit is contained in:
parent
3b877cc240
commit
e8e7ea352e
|
|
@ -1373,6 +1373,11 @@ sub NewSubscription {
|
|||
) = @_;
|
||||
my $dbh = C4::Context->dbh;
|
||||
|
||||
$_ ||= undef # Set to undef for integer values, not empty string
|
||||
for (
|
||||
$aqbooksellerid, $lastvalue1, $innerloop1, $lastvalue2,
|
||||
$innerloop2, $lastvalue3, $innerloop3,
|
||||
);
|
||||
#save subscription (insert into database)
|
||||
my $query = qq|
|
||||
INSERT INTO subscription
|
||||
|
|
|
|||
Loading…
Reference in New Issue