From f7fa2159d28bbb66e19ac7b585b2406341ec93df Mon Sep 17 00:00:00 2001 From: ivan Date: Thu, 29 Sep 2011 05:54:25 +0000 Subject: [PATCH] fix DBI binding for negative integers, shoudl fix CCH update, RT#14243 --- FS/FS/Record.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/FS/FS/Record.pm b/FS/FS/Record.pm index e5bfb0a89..ad26d6041 100644 --- a/FS/FS/Record.pm +++ b/FS/FS/Record.pm @@ -265,7 +265,7 @@ sub _bind_type { my $bind_type = { TYPE => SQL_VARCHAR }; - if ( $type =~ /(big)?(int|serial)/i && $value =~ /^\d+(\.\d+)?$/ ) { + if ( $type =~ /(big)?(int|serial)/i && $value =~ /^-?\d+(\.\d+)?$/ ) { $bind_type = { TYPE => SQL_INTEGER }; -- 2.11.0