$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@laurentian.ca>
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 || ')', '()'), ''))";