diff --git a/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Location/IsContainerQueryBuilder.php b/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Location/IsContainerQueryBuilder.php index 076f48c698..74dbcc890a 100644 --- a/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Location/IsContainerQueryBuilder.php +++ b/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Location/IsContainerQueryBuilder.php @@ -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) ); } }