[interchange] * Don't autovivify @fields, even if prior bug fix stopped
Mike Heins
interchange-cvs at icdevgroup.org
Mon Jun 17 19:12:36 UTC 2013
commit 6481828c1e42fda17971201dd63fff9dcd701967
Author: Mike Heins <mike at perusion.com>
Date: Mon Jun 17 15:11:24 2013 -0400
* Don't autovivify @fields, even if prior bug fix stopped
problem with @fields == 1.
lib/Vend/Table/DBI.pm | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/lib/Vend/Table/DBI.pm b/lib/Vend/Table/DBI.pm
index 10ce8e9..5866407 100644
--- a/lib/Vend/Table/DBI.pm
+++ b/lib/Vend/Table/DBI.pm
@@ -1416,6 +1416,9 @@ sub set_row {
if ($cfg->{PREFER_NULL}) {
for (keys %{$cfg->{PREFER_NULL}}) {
my $i = $cfg->{COLUMN_INDEX}{$_};
+
+ ## We should not autovivify @fields.
+ next unless exists $fields[$i];
undef $fields[$i] if $fields[$i] eq '';
}
}
More information about the interchange-cvs
mailing list