Skip to content

Commit 552fbf2

Browse files
committed
Fix fetchall_arrayref for undefined NAME (issue#156)
1 parent 8104df9 commit 552fbf2

File tree

3 files changed

+6
-1
lines changed

3 files changed

+6
-1
lines changed

ChangeLog

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
* Spellcheck
33
* Fix Makefile rules for Changes (Windows case issue)
44
* Another example to bind columns (issue#159)
5+
* Fix fetchall_arrayref for undefined NAME (issue#156)
56

67
1.646 - 2025-01-11, H.Merijn Brand
78
* Remove "experimental" tag from statistics_info () (issue#134)

DBI.pm

+1-1
Original file line numberDiff line numberDiff line change
@@ -2078,7 +2078,7 @@ sub _new_sth { # called by DBD::<drivername>::db::prepare)
20782078
}
20792079
}
20802080
else {
2081-
my @column_names = @{ $sth->FETCH($sth->FETCH('FetchHashKeyName')) };
2081+
my @column_names = @{ $sth->FETCH($sth->FETCH('FetchHashKeyName')) || [] };
20822082
return [] if !@column_names;
20832083

20842084
$sth->bind_columns( \( @row{@column_names} ) );

lib/DBI/Changes.pm

+4
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,10 @@ Fix Makefile rules for Changes (Windows case issue)
2828
2929
Another example to bind columns (issue#159)
3030
31+
=item *
32+
33+
Fix fetchall_arrayref for undefined NAME (issue#156)
34+
3135
=back
3236
3337
=head2 Changes in DBI 1.646 - 11 Jan 2025

0 commit comments

Comments
 (0)