From 94de608944377fcf46724c1425cdf4740a205015 Mon Sep 17 00:00:00 2001 From: Thomas Lallement Date: Thu, 27 Jun 2024 12:27:32 +0200 Subject: [PATCH] Fix returning all data when no result found (#458) Co-authored-by: tlallement --- Entity/TransUnitRepository.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Entity/TransUnitRepository.php b/Entity/TransUnitRepository.php index 084aa820..75e255d3 100644 --- a/Entity/TransUnitRepository.php +++ b/Entity/TransUnitRepository.php @@ -210,6 +210,8 @@ protected function addTranslationFilter(QueryBuilder $builder, array $locales = if ((is_countable($ids) ? count($ids) : 0) > 0) { $builder->andWhere($builder->expr()->in('tu.id', $ids)); + } else { + $builder->andWhere($builder->expr()->eq(1, 0)); } } }