This commit is contained in:
Fred Tempez 2025-01-22 12:39:18 +01:00
parent f2df3743c6
commit 2e9cfaa991
3 changed files with 6 additions and 3 deletions

View File

@ -1,3 +1,5 @@
# Version 4.6
- Correction de syntaxe.
# Version 4.5 # Version 4.5
- Remplacement du nom générique de classe dans les vues. - Remplacement du nom générique de classe dans les vues.
# Version 4.4 # Version 4.4

View File

@ -1 +1 @@
{"name":"form","realName":"Formulaire","version":"4.1","update":"0.0","delete":true,"dataDirectory":""} {"name":"form","realName":"Formulaire","version":"4.6","update":"0.0","delete":true,"dataDirectory":""}

View File

@ -17,7 +17,7 @@
class form extends common class form extends common
{ {
const VERSION = '4.5'; const VERSION = '4.6';
const REALNAME = 'Formulaire'; const REALNAME = 'Formulaire';
const DATADIRECTORY = ''; // Contenu localisé inclus par défaut (page.json et module.json) const DATADIRECTORY = ''; // Contenu localisé inclus par défaut (page.json et module.json)
@ -479,7 +479,7 @@ class form extends common
if (!empty($singlemail)) { if (!empty($singlemail)) {
$to[] = $singlemail; $to[] = $singlemail;
} }
if ($to) { if (is_array($to)) {
// Sujet du mail // Sujet du mail
$subject = $this->getData(['module', $this->getUrl(0), 'config', 'subject']); $subject = $this->getData(['module', $this->getUrl(0), 'config', 'subject']);
if ($subject === '') { if ($subject === '') {
@ -495,6 +495,7 @@ class form extends common
$this->getData(['config', 'smtp', 'from']) $this->getData(['config', 'smtp', 'from'])
); );
} }
} }
// Redirection // Redirection
$redirect = $this->getData(['module', $this->getUrl(0), 'config', 'pageId']); $redirect = $this->getData(['module', $this->getUrl(0), 'config', 'pageId']);