Skip to content

Commit

Permalink
fix(condition): php warning if a wuestion does not exists
Browse files Browse the repository at this point in the history
Signed-off-by: Thierry Bugier <[email protected]>
  • Loading branch information
btry committed Apr 2, 2020
1 parent d3cc090 commit fcc49a9
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion inc/fields.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,10 @@ public static function isVisible(PluginFormcreatorConditionnableInterface $item,
$nextLogic = 'OR';
}

// TODO: find the best behavior if the question does not exists
if (!isset($fields[$condition['field']])) {
// The field does not exists, give up and make the field visible
return true;
}
$conditionField = $fields[$condition['field']];

$value = false;
Expand Down

0 comments on commit fcc49a9

Please sign in to comment.