[open-ils-commits] [GIT] Evergreen ILS branch origin/rel_2_0 created. 5fa0dc08e5b1d4bf85c33632e0d810031dad8ec3

Evergreen Git git at git.evergreen-ils.org
Mon Jun 13 09:54:39 EDT 2011


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Evergreen ILS".

The branch, origin/rel_2_0 has been created
        at  5fa0dc08e5b1d4bf85c33632e0d810031dad8ec3 (commit)

- Log -----------------------------------------------------------------
commit 5fa0dc08e5b1d4bf85c33632e0d810031dad8ec3
Author: Dan Scott <dan at coffeecode.net>
Date:   Mon Jun 13 09:45:39 2011 -0400

    Prevent uninit var warnings in QueryParser.pm
    
    $suffix_op and $prefix_op would not be defined if $suffix or $prefix did
    not evaluate to true, leading to warnings about undefined variables in
    open-ils.storage_stderr.log.
    
    Signed-off-by: Dan Scott <dscott at laurentian.ca>

diff --git a/Open-ILS/src/perlmods/OpenILS/Application/Storage/Driver/Pg/QueryParser.pm b/Open-ILS/src/perlmods/OpenILS/Application/Storage/Driver/Pg/QueryParser.pm
index c1fb759..e329d98 100644
--- a/Open-ILS/src/perlmods/OpenILS/Application/Storage/Driver/Pg/QueryParser.pm
+++ b/Open-ILS/src/perlmods/OpenILS/Application/Storage/Driver/Pg/QueryParser.pm
@@ -777,8 +777,11 @@ sub buildSQL {
     my $suffix = $self->suffix || '';
 
     $prefix = "'$prefix' ||" if $prefix;
-    my $suffix_op = ":$suffix" if $suffix;
-    my $suffix_after = "|| '$suffix_op'" if $suffix;
+    my $suffix_op = '';
+    my $suffix_after = '';
+
+    $suffix_op = ":$suffix" if $suffix;
+    $suffix_after = "|| '$suffix_op'" if $suffix;
 
     $sql = "to_tsquery('$classname', COALESCE(NULLIF($prefix '(' || btrim(regexp_replace($sql,E'(?:\\\\s+|:)','$suffix_op&','g'),'&|') $suffix_after || ')', '()'), ''))";
 

-----------------------------------------------------------------------


hooks/post-receive
-- 
Evergreen ILS


More information about the open-ils-commits mailing list