Merge pull request #17939 from Hystepik/develop#2

Fix #17930 : input boxes can be empty as previously on survey
This commit is contained in:
Laurent Destailleur 2021-06-15 22:20:03 +02:00 committed by GitHub
commit b6f90c3299
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -55,7 +55,7 @@ if (GETPOST('confirmation')) {
$tmphorairesi = GETPOST('horaires'.$i, 'array'); $tmphorairesi = GETPOST('horaires'.$i, 'array');
if (!is_array($tmphorairesi) || empty($tmphorairesi[$j])) { if (!is_array($tmphorairesi)) {
$errheure[$i][$j] = true; $errheure[$i][$j] = true;
$erreur = true; $erreur = true;
continue; continue;
@ -155,7 +155,7 @@ if (GETPOST('confirmation')) {
} }
} }
if (isset($errheure)) { if (!empty($errheure)) {
setEventMessages($langs->trans("ErrorBadFormat"), null, 'errors'); setEventMessages($langs->trans("ErrorBadFormat"), null, 'errors');
} }
} }