[open-ils-commits] r16024 - trunk/Open-ILS/src/perlmods/OpenILS/Application/Storage (miker)
svn at svn.open-ils.org
svn at svn.open-ils.org
Sat Mar 27 16:06:35 EDT 2010
Author: miker
Date: 2010-03-27 16:06:30 -0400 (Sat, 27 Mar 2010)
New Revision: 16024
Modified:
trunk/Open-ILS/src/perlmods/OpenILS/Application/Storage/QueryParser.pm
Log:
make empty queries safe
Modified: trunk/Open-ILS/src/perlmods/OpenILS/Application/Storage/QueryParser.pm
===================================================================
--- trunk/Open-ILS/src/perlmods/OpenILS/Application/Storage/QueryParser.pm 2010-03-27 19:21:51 UTC (rev 16023)
+++ trunk/Open-ILS/src/perlmods/OpenILS/Application/Storage/QueryParser.pm 2010-03-27 20:06:30 UTC (rev 16024)
@@ -503,7 +503,9 @@
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 new {
my $pkg = shift;
$pkg = ref($pkg) || $pkg;
- my %args = (joiner => '&', @_);
+ my %args = (query => [], joiner => '&', @_);
return bless \%args => $pkg;
}
More information about the open-ils-commits
mailing list