Fix uninitialized variable in abstract_query2str_impl
authorJared Camins-Esakov <jcamins@cpbibliography.com>
Tue, 21 Aug 2012 17:50:06 +0000 (13:50 -0400)
committerJared Camins-Esakov <jcamins@cpbibliography.com>
Sun, 9 Sep 2012 19:16:00 +0000 (15:16 -0400)
Because abstract_query2str_impl can be called without the depth
parameter, it is easy to end up in a situation where you are getting
lots of warnings, and not getting group end markers.

Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/QueryParser.pm

index 7ee0402..3afb9d7 100644 (file)
@@ -883,6 +883,7 @@ sub _abstract_query2str_modifier {
 # abstract_query.
 sub abstract_query2str_impl {
     my ($abstract_query, $depth) = @_;
+    $depth |= 0;
 
     my $qpconfig = $parser_config{QueryParser};