X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FSQL%2FAbstract%2FTree.pm;h=17454dc95f7224f142c111b3e51283587e84aae9;hb=d282bb5005b32a73d3120560fb895c5e753c7ef3;hp=0db1757bfa417638338cd6d81031b2a90bd040da;hpb=5e5cbf5124ea9704c01824f32b70072c39f69179;p=scpubgit%2FQ-Branch.git diff --git a/lib/SQL/Abstract/Tree.pm b/lib/SQL/Abstract/Tree.pm index 0db1757..17454dc 100644 --- a/lib/SQL/Abstract/Tree.pm +++ b/lib/SQL/Abstract/Tree.pm @@ -545,7 +545,7 @@ sub _parenthesis_unroll { for my $child (@{$ast->[1]}) { # the current node in this loop is *always* a PAREN - if (not ref $child or not $child->[0] eq 'PAREN') { + if (! ref $child or ! @$child or $child->[0] ne 'PAREN') { push @children, $child; next; }