Commit 3d617feb authored by nkoth's avatar nkoth

[FIX] If pref search_default_where is set to Entire set, value of pref is...

[FIX] If pref search_default_where is set to Entire set, value of pref is array('') which results in blank type, avoid filtering by blank type which result in no results in that case
parent 7a58e382
......@@ -67,11 +67,15 @@ class Search_Query implements Search_Query_Interface
{
if (is_array($types)) {
foreach ($types as $type) {
$tokens[] = new Search_Expr_Token($type);
if ($type) {
$tokens[] = new Search_Expr_Token($type);
}
}
$or = new Search_Expr_Or($tokens);
$this->addPart($or, 'identifier', 'object_type');
} else {
if (isset($tokens)) {
$or = new Search_Expr_Or($tokens);
$this->addPart($or, 'identifier', 'object_type');
}
} elseif ($types) {
$token = new Search_Expr_Token($types);
$this->addPart($token, 'identifier', 'object_type');
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment