From dcc53a8e97d7772fa5a721f42fbc68681bfdca6a Mon Sep 17 00:00:00 2001 From: Yann-BUTSCHER-EIRL Date: Thu, 30 Mar 2023 18:08:22 +0200 Subject: [PATCH] Ref #316: fix ajax call for membership list load --- src/Controller/Ajax/PeopleAjaxController.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Controller/Ajax/PeopleAjaxController.php b/src/Controller/Ajax/PeopleAjaxController.php index 4990508e..e75c983f 100644 --- a/src/Controller/Ajax/PeopleAjaxController.php +++ b/src/Controller/Ajax/PeopleAjaxController.php @@ -166,13 +166,13 @@ public function getMembershipsListAction(People $people) 'type_label' => $membership->getType()->getLabel(), 'type_description' => $membership->getType()->getDescription(), 'price' => $membership->getType()->getDefaultAmount(), - 'date_start' => $membership->getDateStart()->format('d/m/Y'), - 'date_end' => $membership->getDateEnd()->format('d/m/Y'), + 'date_start' => $membership->getDateStart()?->format('d/m/Y'), + 'date_end' => $membership->getDateEnd()?->format('d/m/Y'), 'payment' => [ 'amount' => $payment->getAmount(), 'mean' => $payment->getType()->getLabel(), - 'date_received' => $payment->getDateReceived()->format('d/m/Y'), - 'date_cashed' => $payment->getDateCashed()->format('d/m/Y'), + 'date_received' => $payment->getDateReceived()?->format('d/m/Y'), + 'date_cashed' => $payment->getDateCashed()?->format('d/m/Y'), 'payer' => [ 'id' => $payment->getPayer()->getId(), 'denomination' => $payment->getPayer()->getDenomination()->getLabel(),