Subject: | [PATCH] SQL::Abstract:An empty array ref as value for -and can cause incorrect SQL |
Date: | Thu, 30 Aug 2018 00:09:36 +0200 |
To: | bug-SQL-Abstract [...] rt.cpan.org |
From: | Fabrizio Gennari <fabrizio.ge [...] tiscali.it> |
An empty array ref as value for |-and| can cause incorrect SQL. Example:
|$ perl -Mv5.12 -MSQL::Abstract -e 'my
($sql,@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 = ? ) ) |
https://github.com/dbsrgits/sql-abstract/pull/15 is a proposed fix to
that bug