From 201fecc73545605c19636d1c71c1adb99e43f768 Mon Sep 17 00:00:00 2001 From: miker Date: Sat, 27 Mar 2010 20:06:30 +0000 Subject: [PATCH] make empty queries safe git-svn-id: svn://svn.open-ils.org/ILS/trunk@16024 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Open-ILS/src/perlmods/OpenILS/Application/Storage/QueryParser.pm | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Open-ILS/src/perlmods/OpenILS/Application/Storage/QueryParser.pm b/Open-ILS/src/perlmods/OpenILS/Application/Storage/QueryParser.pm index 390cc264bc..cc4dc54255 100755 --- a/Open-ILS/src/perlmods/OpenILS/Application/Storage/QueryParser.pm +++ b/Open-ILS/src/perlmods/OpenILS/Application/Storage/QueryParser.pm @@ -503,7 +503,9 @@ sub decompose { my $last_type = ''; while (!$remainder) { - if (/$group_end_re/) { # end of an explicit group + if (/^\s*$/) { # end of an explicit group + last; + } elsif (/$group_end_re/) { # end of an explicit group warn "Encountered explicit group end\n" if $self->debug; $_ = $'; @@ -689,7 +691,7 @@ sub QueryParser { sub new { my $pkg = shift; $pkg = ref($pkg) || $pkg; - my %args = (joiner => '&', @_); + my %args = (query => [], joiner => '&', @_); return bless \%args => $pkg; } -- 2.11.0