From: Johan Cwiklinski Date: Fri, 12 Apr 2024 15:10:45 +0000 (+0200) Subject: Fix pdf member form X-Git-Url: https://git.agnieray.net/?a=commitdiff_plain;h=f5b0984973b77eb48336a129373f830a386ad0f3;p=galette.git Fix pdf member form --- diff --git a/galette/lib/Galette/Entity/Adherent.php b/galette/lib/Galette/Entity/Adherent.php index ee75684a9..f9bdbe971 100644 --- a/galette/lib/Galette/Entity/Adherent.php +++ b/galette/lib/Galette/Entity/Adherent.php @@ -1821,14 +1821,14 @@ class Adherent return $status->getLabel($this->status); case 'sfullname': return $this->getNameWithCase( - $this->name, - $this->surname, + $this->name ?? '', + $this->surname ?? '', ($this->title ?? false) ); case 'saddress': return $this->address; case 'sname': - return $this->getNameWithCase($this->name, $this->surname); + return $this->getNameWithCase($this->name ?? '', $this->surname ?? ''); case 'rbirthdate': return $this->birthdate ?? null; case 'sgender': diff --git a/galette/lib/Galette/IO/PdfAdhesionForm.php b/galette/lib/Galette/IO/PdfAdhesionForm.php index b42bc31ab..00c6a3e7e 100644 --- a/galette/lib/Galette/IO/PdfAdhesionForm.php +++ b/galette/lib/Galette/IO/PdfAdhesionForm.php @@ -63,9 +63,6 @@ class PdfAdhesionForm extends Pdf $this->filename = $adh->id ? __("adherent_form") . '.' . $adh->id . '.pdf' : __("adherent_form") . '.pdf'; - $this->Open(); - - $this->AddPage(); if ($model !== null) { $this->PageHeader(); $this->PageBody();