Skip to content

Commit

Permalink
Merge pull request #164 from LartTyler/fix/query-sub-doc-error
Browse files Browse the repository at this point in the history
Merge fix/query-sub-doc-error into master
  • Loading branch information
LartTyler authored Apr 12, 2020
2 parents de6806f + 40d6e52 commit 0ac2a58
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/Localization/QueryLocalizationHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,12 @@ public function addTranslationClauses(

foreach ($query as $key => $value) {
if ($key[0] === '$') {
$this->addTranslationClauses($resolver, $qb, $value, $visited, $entities);
// Resolves an issue with operators that use an array of sub-documents
if (!isset($value[0]))
$value = [$value];

foreach ($value as $item)
$this->addTranslationClauses($resolver, $qb, $item, $visited, $entities);

continue;
}
Expand Down

0 comments on commit 0ac2a58

Please sign in to comment.