Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fetchall_arrayref({}) in certain cases #156

Open
rwfranks opened this issue Oct 27, 2024 · 0 comments
Open

fetchall_arrayref({}) in certain cases #156

rwfranks opened this issue Oct 27, 2024 · 0 comments

Comments

@rwfranks
Copy link

Transcribed verbatim from CPAN RT#124721, warts and all.

Thu Mar 08 02:58:44 2018 ZHENYZ [...] cpan.org - Ticket created
Subject: fetchall_arrayref({}) in certain cases

Some DBD drivers, like DBD::Sybase, could return undef for $sth->FETCH("NAME") in certain cases. When calling fetchall_arrayref({}), it could cause an error like "Can't use an undefined value as an ARRAY reference at .../DBI.pm line 2081", which is this line

https://metacpan.org/source/TIMB/DBI-1.640/DBI.pm#L2081

IMHO it could be better to change this line to below

my @column_names = @{ $sth->FETCH($sth->FETCH('FetchHashKeyName')) || [] };

We also have old DBI version 1.616 and that one does not have the issue. I think this issue appears after DBI 1.619. There was a similar report several years ago https://www.nntp.perl.org/group/perl.dbi.users/2013/09/msg36748.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant