Bug 3955: Fixes leading space error in search.

Leading spaces in a search term were causing an error to be thrown in a join operator when auto-truncations is turned on. This patch removes the leading spaces.
This commit is contained in:
Garry Collum 2009-12-18 13:52:56 -05:00 committed by Henri-Damien LAURENT
parent c505daad7d
commit 898b78535b

View file

@ -932,8 +932,10 @@ sub buildQuery {
}
if ($auto_truncation){
$operand=~join(" ",map{ "$_*" }split (/\s+/,$operand));
}
# join throws an error if there is a leading space
$operand =~ s/^\s+//;
$operand=~join(" ",map{ "$_*" }split (/\s+/,$operand));
}
# Detect Truncation
my $truncated_operand;