Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down Expand Up @@ -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();
Expand All @@ -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();
Expand Down
Loading