From 420e66906f33c9941f1350c3db10b64ea29f955e Mon Sep 17 00:00:00 2001 From: Alexander Kellner Date: Wed, 21 Feb 2024 15:28:41 +0100 Subject: [PATCH] [BUGFIX] Prevent exception in company list if there are no pagevisits of companies After this commit we search for a record with uid=0 as a workarround if there are no uids given --- Classes/Domain/Repository/PagevisitRepository.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Classes/Domain/Repository/PagevisitRepository.php b/Classes/Domain/Repository/PagevisitRepository.php index 96fe3eba..44a8d4f0 100644 --- a/Classes/Domain/Repository/PagevisitRepository.php +++ b/Classes/Domain/Repository/PagevisitRepository.php @@ -114,7 +114,7 @@ public function findLatestPagevisitsWithCompanies(int $limit = 8): QueryResultIn $query = $this->createQuery(); $logicalAnd = [ - $query->in('uid', $identifiers), + $query->in('uid', $identifiers ?: [0]), ]; $query->matching( $query->logicalAnd(...$logicalAnd)