]> git.agnieray.net Git - galette.git/blobdiff - galette/lib/Galette/Entity/Adherent.php
Few fixes, missing escaping
[galette.git] / galette / lib / Galette / Entity / Adherent.php
index 5fdea7d05f7c1ec496309e2576c2d10ae0880703..55f0fd30c23eec39dad060d158f3bc5c02f7a25b 100644 (file)
@@ -657,7 +657,7 @@ class Adherent
      */
     public function isCompany()
     {
-        return trim($this->_company_name) != '';
+        return trim($this->_company_name ?? '') != '';
     }
 
     /**
@@ -876,8 +876,8 @@ class Adherent
             $str .= $title->tshort . ' ';
         }
 
-        $str .= mb_strtoupper($name, 'UTF-8') . ' ' .
-            ucwords(mb_strtolower($surname, 'UTF-8'), " \t\r\n\f\v-_|");
+        $str .= mb_strtoupper($name ?? '', 'UTF-8') . ' ' .
+            ucwords(mb_strtolower($surname ?? '', 'UTF-8'), " \t\r\n\f\v-_|");
 
         if ($id !== false || $nick !== false) {
             $str .= ' (';
@@ -1734,6 +1734,10 @@ class Adherent
                             return null;
                         }
                         break;
+                    case 'address':
+                    case 'address_continuation':
+                        return $this->$rname ?? '';
+                        break;
                     case 'birthdate':
                     case 'creation_date':
                     case 'modification_date':