[DBIx-Class-Devel] [dbsrgits/sql-abstract] Do not generate incorrect SQL in presence of -and=>[] (#15)
fabzzap
notifications at github.com
Wed Aug 29 22:07:57 GMT 2018
An empty array ref as value for `-and` can cause incorrect SQL. Example:
```
$ perl -Mv5.12 -MSQL::Abstract -e 'my ($sql, at bind)=SQL::Abstract->new->where({-and=>[],-or=>[a=>1]});say $sql'
Use of uninitialized value in join or string at /usr/share/perl5/SQL/Abstract.pm line 1482.
WHERE ( ( AND a = ? ) )
```
This is a proposed fix to that bug
You can view, comment on, or merge this pull request online at:
https://github.com/dbsrgits/sql-abstract/pull/15
-- Commit Summary --
* Do not generate incorrect SQL in presence of -and=>[]
-- File Changes --
M lib/SQL/Abstract.pm (9)
-- Patch Links --
https://github.com/dbsrgits/sql-abstract/pull/15.patch
https://github.com/dbsrgits/sql-abstract/pull/15.diff
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/dbsrgits/sql-abstract/pull/15
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.scsys.co.uk/pipermail/dbix-class-devel/attachments/20180829/44e13c5e/attachment.htm>
More information about the DBIx-Class-Devel
mailing list