Skip to content

Commit

Permalink
fix IsContainerQueryBuilder from Persistance
Browse files Browse the repository at this point in the history
  • Loading branch information
tischsoic committed Mar 11, 2024
1 parent bdb8ced commit 50b9ce0
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,13 @@ public function buildQueryConstraint(
'content.contentclass_id = contentclass.id',
);

$value = $criterion->value ? 1 : 0;
/** @var array{bool} $criterionValue */
$criterionValue = $criterion->value;
$isContainer = reset($criterionValue);

return $queryBuilder->expr()->in(
'contentclass.is_container',
$queryBuilder->createNamedParameter($value, ParameterType::INTEGER)
$queryBuilder->createNamedParameter((int)$isContainer, ParameterType::INTEGER)
);
}
}

0 comments on commit 50b9ce0

Please sign in to comment.