Skip to content

Commit 6006bad

Browse files
committed
fix(condition): php warning if a wuestion does not exists
Signed-off-by: Thierry Bugier <[email protected]>
1 parent 45e3030 commit 6006bad

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

inc/fields.class.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,10 @@ public static function isVisible(PluginFormcreatorConditionnableInterface $item,
189189
$nextLogic = PluginFormcreatorCondition::SHOW_LOGIC_OR;
190190
}
191191

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

195198
$value = false;

0 commit comments

Comments
 (0)