diff --git a/src/Repository/EventRepository.php b/src/Repository/EventRepository.php index 7c89b4f..5cad5f9 100644 --- a/src/Repository/EventRepository.php +++ b/src/Repository/EventRepository.php @@ -102,8 +102,8 @@ public static function createEnabledCriteria(): Criteria public function findAllScheduledEvents(int $limit) { $now = new \DateTimeImmutable(); - $queryBuilder = $this->createQueryBuilder('e') - ->where('e.enabled = :enabled') + $queryBuilder = $this->createQueryBuilder('e'); + $queryBuilder->where('e.enabled = :enabled') ->andWhere( $queryBuilder->expr()->orX( $queryBuilder->expr()->gte('e.startDate', ':now'),