mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-17 06:53:15 +00:00
Merge pull request #1453 from mdarse/invalid-field-query
Handle queries with invalid fields
This commit is contained in:
@@ -25,7 +25,13 @@ class Query
|
||||
|
||||
public function build(QueryContext $context)
|
||||
{
|
||||
return $this->root->buildQuery($context);
|
||||
$query = $this->root->buildQuery($context);
|
||||
if ($query === null) {
|
||||
$query = [];
|
||||
$query['bool']['must'] = [];
|
||||
}
|
||||
|
||||
return $query;
|
||||
}
|
||||
|
||||
public function dump()
|
||||
|
Reference in New Issue
Block a user