Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit ce07899

Browse filesBrowse files
committed
fix(formanswer): php warning
1 parent d630302 commit ce07899
Copy full SHA for ce07899

1 file changed

+4-3Lines changed: 4 additions & 3 deletions

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎inc/formanswer.class.php‎

Copy file name to clipboardExpand all lines: inc/formanswer.class.php
+4-3Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1404,9 +1404,10 @@ protected function validateFormAnswer($input): bool {
14041404
continue;
14051405
}
14061406
// Count the errors in session
1407-
$errors_count = $_SESSION['MESSAGE_AFTER_REDIRECT'][ERROR]
1408-
? count($_SESSION['MESSAGE_AFTER_REDIRECT'][ERROR])
1409-
: 0;
1407+
$errors_count = 0;
1408+
if (isset($_SESSION['MESSAGE_AFTER_REDIRECT'][ERROR])) {
1409+
$errors_count = count($_SESSION['MESSAGE_AFTER_REDIRECT'][ERROR]);
1410+
}
14101411
if (PluginFormcreatorFields::isVisible($field->getQuestion(), $this->questionFields) && !$this->questionFields[$id]->isValid()) {
14111412
$new_errors_count = $_SESSION['MESSAGE_AFTER_REDIRECT'][ERROR]
14121413
? count($_SESSION['MESSAGE_AFTER_REDIRECT'][ERROR])

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.