Skip to content
Snippets Groups Projects
Commit de17c854 authored by Niels Nijens's avatar Niels Nijens
Browse files

Fix notice in BoolQuery::getQueries when nothing is added to bool type

parent 729740b0
No related branches found
No related tags found
No related merge requests found
...@@ -42,7 +42,10 @@ class BoolQuery implements BuilderInterface ...@@ -42,7 +42,10 @@ class BoolQuery implements BuilderInterface
} }
/** /**
* @param null $boolType * Returns the query instances (by bool type).
*
* @param string|null $boolType
*
* @return array * @return array
*/ */
public function getQueries($boolType = null) public function getQueries($boolType = null)
...@@ -57,7 +60,11 @@ class BoolQuery implements BuilderInterface ...@@ -57,7 +60,11 @@ class BoolQuery implements BuilderInterface
return $queries; return $queries;
} }
return $this->container[$boolType]; if (isset($this->container[$boolType])) {
return $this->container[$boolType];
}
return [];
} }
/** /**
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment