Skip to content

Commit e584156

Browse files
committed
Fixed selectrow_*ref to return undef on error in list context
1 parent 10576bd commit e584156

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

Changes

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@ DBI::Changes - List of significant changes to the DBI
88

99
=head2 Changes in DBI 1.633
1010

11-
Made t/42prof_data.t more informative
11+
Fixed selectrow_*ref to return undef on error in list context
12+
instead if an empty list.
13+
Changed t/42prof_data.t more informative
1214

1315
=head2 Changes in DBI 1.632 - 5th Nov 2014
1416

DBI.pm

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1636,9 +1636,9 @@ sub _new_sth { # called by DBD::<drivername>::db::prepare)
16361636
sub _do_selectrow {
16371637
my ($method, $dbh, $stmt, $attr, @bind) = @_;
16381638
my $sth = ((ref $stmt) ? $stmt : $dbh->prepare($stmt, $attr))
1639-
or return;
1639+
or return undef;
16401640
$sth->execute(@bind)
1641-
or return;
1641+
or return undef;
16421642
my $row = $sth->$method()
16431643
and $sth->finish;
16441644
return $row;

0 commit comments

Comments
 (0)