diff --git a/src/Query/BoolQuery.php b/src/Query/BoolQuery.php index 51a0be0258c728fd5c228116437a374d4e555749..55bd94a94fb35494f49f6be0ae517852bbe4b8e9 100644 --- a/src/Query/BoolQuery.php +++ b/src/Query/BoolQuery.php @@ -42,7 +42,10 @@ class BoolQuery implements BuilderInterface } /** - * @param null $boolType + * Returns the query instances (by bool type). + * + * @param string|null $boolType + * * @return array */ public function getQueries($boolType = null) @@ -57,7 +60,11 @@ class BoolQuery implements BuilderInterface return $queries; } - return $this->container[$boolType]; + if (isset($this->container[$boolType])) { + return $this->container[$boolType]; + } + + return []; } /**