We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d630302 commit ce07899Copy full SHA for ce07899
inc/formanswer.class.php
@@ -1404,9 +1404,10 @@ protected function validateFormAnswer($input): bool {
1404
continue;
1405
}
1406
// Count the errors in session
1407
- $errors_count = $_SESSION['MESSAGE_AFTER_REDIRECT'][ERROR]
1408
- ? count($_SESSION['MESSAGE_AFTER_REDIRECT'][ERROR])
1409
- : 0;
+ $errors_count = 0;
+ if (isset($_SESSION['MESSAGE_AFTER_REDIRECT'][ERROR])) {
+ $errors_count = count($_SESSION['MESSAGE_AFTER_REDIRECT'][ERROR]);
1410
+ }
1411
if (PluginFormcreatorFields::isVisible($field->getQuestion(), $this->questionFields) && !$this->questionFields[$id]->isValid()) {
1412
$new_errors_count = $_SESSION['MESSAGE_AFTER_REDIRECT'][ERROR]
1413
? count($_SESSION['MESSAGE_AFTER_REDIRECT'][ERROR])
0 commit comments