]> git.agnieray.net Git - galette.git/commitdiff
Fix pdf member form
authorJohan Cwiklinski <johan@x-tnd.be>
Fri, 12 Apr 2024 15:10:45 +0000 (17:10 +0200)
committerJohan Cwiklinski <johan@x-tnd.be>
Fri, 12 Apr 2024 15:10:45 +0000 (17:10 +0200)
galette/lib/Galette/Entity/Adherent.php
galette/lib/Galette/IO/PdfAdhesionForm.php

index ee75684a94019b6cb251f6b57f4c10379a0f881d..f9bdbe971a1a3ef5086252308d2069e383600e31 100644 (file)
@@ -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':
index b42bc31abc4bc92eba9c9791a38562987cb6157a..00c6a3e7eaca2bf862bf2a71b9ecf117b23333ac 100644 (file)
@@ -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();