Skip to content

Commit

Permalink
improve checking variable in _execute: not only check ref but check a…
Browse files Browse the repository at this point in the history
…rray ref.
  • Loading branch information
ktat committed Aug 23, 2012
1 parent 37cccb7 commit 2a2d36b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/Teng.pm
Expand Up @@ -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();
};
Expand Down

0 comments on commit 2a2d36b

Please sign in to comment.