Skip to content

Commit

Permalink
Fix fetchall_arrayref for undefined NAME (issue#156)
Browse files Browse the repository at this point in the history
  • Loading branch information
Tux committed Jan 17, 2025
1 parent 8104df9 commit 552fbf2
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
* Spellcheck
* Fix Makefile rules for Changes (Windows case issue)
* Another example to bind columns (issue#159)
* Fix fetchall_arrayref for undefined NAME (issue#156)

1.646 - 2025-01-11, H.Merijn Brand
* Remove "experimental" tag from statistics_info () (issue#134)
Expand Down
2 changes: 1 addition & 1 deletion DBI.pm
Original file line number Diff line number Diff line change
Expand Up @@ -2078,7 +2078,7 @@ sub _new_sth { # called by DBD::<drivername>::db::prepare)
}
}
else {
my @column_names = @{ $sth->FETCH($sth->FETCH('FetchHashKeyName')) };
my @column_names = @{ $sth->FETCH($sth->FETCH('FetchHashKeyName')) || [] };
return [] if !@column_names;

$sth->bind_columns( \( @row{@column_names} ) );
Expand Down
4 changes: 4 additions & 0 deletions lib/DBI/Changes.pm
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ Fix Makefile rules for Changes (Windows case issue)
Another example to bind columns (issue#159)
=item *
Fix fetchall_arrayref for undefined NAME (issue#156)
=back
=head2 Changes in DBI 1.646 - 11 Jan 2025
Expand Down

0 comments on commit 552fbf2

Please sign in to comment.