Permalink
Browse files

improve checking variable in _execute: not only check ref but check a…

…rray ref.
  • Loading branch information...
1 parent 37cccb7 commit 2a2d36b8734a8524574e4668afb4706b060d274b @ktat ktat committed Aug 23, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/Teng.pm
View
@@ -231,7 +231,7 @@ sub _execute {
$sth = $self->dbh->prepare($sql);
my $i = 1;
for my $v ( @{ $binds || [] } ) {
- $sth->bind_param( $i++, ref($v) ? @$v : $v );
+ $sth->bind_param( $i++, ref($v) eq 'ARRAY' ? @$v : $v );
}
$sth->execute();
};

0 comments on commit 2a2d36b

Please sign in to comment.