diff --git a/htdocs/compta/paiement/card.php b/htdocs/compta/paiement/card.php
index 680a8c501a2..1bc1270e2d6 100644
--- a/htdocs/compta/paiement/card.php
+++ b/htdocs/compta/paiement/card.php
@@ -148,7 +148,7 @@ if ($action == 'confirm_validate' && $confirm == 'yes' && $user->rights->facture
break;
}
- if ($invoice->generateDocument($fac->modelpdf, $outputlangs, $hidedetails, $hidedesc, $hideref) < 0) {
+ if ($invoice->generateDocument($invoice->modelpdf, $outputlangs, $hidedetails, $hidedesc, $hideref) < 0) {
$errors++;
setEventMessages($invoice->error, $invoice->errors, 'errors');
break;
diff --git a/htdocs/public/members/new.php b/htdocs/public/members/new.php
index 3d0ecc6fd16..cddfd0524b1 100644
--- a/htdocs/public/members/new.php
+++ b/htdocs/public/members/new.php
@@ -212,7 +212,7 @@ if (empty($reshook) && $action == 'add') {
$error++;
$errmsg .= $langs->trans('ErrorFieldRequired', $langs->transnoentitiesnoconv('Email'))."
\n";
} elseif (GETPOST("email") && !isValidEmail(GETPOST("email"))) {
- + $langs->load('errors');
+ $langs->load('errors');
$error++;
$errmsg .= $langs->trans("ErrorBadEMail", GETPOST("email"))."
\n";
}