From 62ce1a56edac87e015dc11f87afd0b052ec8a5c8 Mon Sep 17 00:00:00 2001 From: Nathan Boiron Date: Thu, 28 May 2026 13:17:51 +0200 Subject: [PATCH] =?UTF-8?q?Gestion=20de=20donn=C3=A9es=20manquantes?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../AppBundle/Event/Model/Repository/EventRepository.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sources/AppBundle/Event/Model/Repository/EventRepository.php b/sources/AppBundle/Event/Model/Repository/EventRepository.php index 8a7e35cfc..2a4252bae 100644 --- a/sources/AppBundle/Event/Model/Repository/EventRepository.php +++ b/sources/AppBundle/Event/Model/Repository/EventRepository.php @@ -32,7 +32,7 @@ class EventRepository extends Repository implements MetadataInitializer public function getNextEvent() { $events = $this->getNextEvents(); - if ($events->count() === 0) { + if ($events === null || $events->count() === 0) { return null; } return $events->first(); @@ -78,7 +78,7 @@ public function getNextPublicizedEvents(): array public function getLastEvent() { $query = $this - ->getQuery('SELECT id, path, titre, text, date_debut, date_fin, date_fin_appel_conferencier, date_fin_vente FROM afup_forum ORDER BY date_debut DESC, id DESC') + ->getQuery('SELECT id, path, titre, text, date_debut, date_fin, date_debut_appel_conferencier, date_fin_appel_conferencier, date_fin_vente, nb_places FROM afup_forum ORDER BY date_debut DESC, id DESC') ; return $query->query($this->getCollection(new HydratorSingleObject()))->first(); @@ -87,7 +87,7 @@ public function getLastEvent() public function getMostRecentEvent(): ?Event { $query = $this - ->getQuery('SELECT id, path, titre, text, date_debut, date_fin, date_fin_appel_conferencier, date_fin_vente FROM afup_forum ORDER BY date_debut DESC') + ->getQuery('SELECT id, path, titre, text, date_debut, date_fin, date_debut_appel_conferencier, date_fin_appel_conferencier, date_fin_vente, nb_places FROM afup_forum ORDER BY date_debut DESC') ; return $query->query($this->getCollection(new HydratorSingleObject()))->first();